4 users online. Create an account or sign in to join them.Users
DS: Calling Entries by First Letter
This is an open discussion with 3 replies, filed under Troubleshooting.
Search
So, regular expressions are your friend. This is the solution I found myself: Set up a data source with the following regexp: regexp:^{$character}. where $character is the URL parameter. As a fallback, this data source returns all entries of the section when $character is not set. If you want to have no entries returned if $character is not set, just use regexp:^{$character}
Can this method provide me with a fallback language? I filter by a global parameter that returns the first 2 letters of the langauge header of the visitors browser…. But if I don’t have an entry in the language of the visitor, It should fallback to a fallback language, ea English.
You could just use the syntax for fallbacks: {$language:en}
http://symphony-cms.com/learn/concepts/view/data-source-filters/
Create an account or sign in to comment.
I'm trying to set up a document archive with an alphabetic index. The current character is set via the URL, e. g.
/documents/a. The document archive should only show entries that start with the selected character.Is there a simple way to set up the data source editor to filter by the first character or do I have to create a custom DS?