Search

In Symphony we have flexible instrument for filtering DS output - Url Parameters of a page.
Say, Url params of a page are /category/tag. Then, going to link http://hostname/games/xbox we are getting output with related entries (category - games, tag - xbox).

But there is one limitation.
In example above, if you want filter output only by tag -- you can't do this.
I.e with link looks like http://hostname/none/xbox you will get nothing in you output (certanly, if you havent none category in your categories list =).

We can correct this. In /symphony/lib/toolkit/data-sources/datasource-section.php
Find line 88 (in beta-rev2)

        if((is_array($filter) && empty($filter)) || trim($filter) == '') continue;

Replace it with

        if((is_array($filter) && empty($filter)) || trim($filter) == '-') continue;

Now you can compose link as http://hostname/-/xbox and you'll get output related only to xbox tag.
Or, for example, http://hostname/games/-/adventure will work too (category - games. tag - none, genre - adventure).

Hope, it can be helpful ;)

In example above, if you want filter output only by tag -- you can't do this.

You can in fact set URL params with GET variables, e.g. http://hostname/?tag=xbox, and even unspecified values can be supplied to the XSLT in this way, e.g. http://hostname/?other=bananas.

But probably a better way to do multiple filtering is to use union and intersection syntax to supply a range of values to a single parameter, e.g. http://hostname/xbox+bananas/, which is also order-independent.

Yup... I should digg the new union and intersect syntax.
Looks like I reinvent bicycle =)

Anyway, for Symphony 1.7 this could be solution.

Ok, maybe I'm retard, I can't get some points.

With given structure:

CREATURES

Mammals

Monkeys

good
bad
ugly

Giraffes

good
bad
ugly

Reptiles
...

How can I select all ugly creatures?
Without loosing possibility select all mammals or all monkeys?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details