4 users online. Create an account or sign in to join them.Users

Search

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?

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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details