Filter DS based on partial Page Title
This is an open discussion with 3 replies, filed under General.
Search
If your field supports regex filtering in the DS, then the following should work
regex: \s#(.+)$
This should look for any characters after the last space and hash in the title, you may need to check that though, my regex is a little rusty.
On a side note, have you tried the Pages Field extension, to link entries to specific pages, then filter on that value matching the current page
$current-page
May be easier…
Thanks designermonkey.
I’ve been looking at using a regex filter but my understanding is that if I select ‘System ID’ for the filter item then the regular expression is applied to the entries’ IDs. How do I tell the filter that it needs to look at the {$page-title} parameter, pull out the segment identified by the regex, and then use that to select an entry from the database?
I’ve been reading the forum threads about ‘static page’ handling and might restructure things to use the Pages Field but I still want to know how to solve this problem.
That’s a good point. Doh!
You may have to customise the datasource, but I’m not the man for that…
Create an account or sign in to comment.
I’ve got a section whose entries each map to a separate page. In order to pass each entry to its page I’ve done the following.
This works fine but I’d like to have friendlier and more meaningful titles than ‘17’ or ‘23’ when I’m looking at Blueprints>Pages.
Is there a way to use titles like ‘Home #7’ and ‘Process #18’ and then filter my DS against just the portion after ‘#’?