Filtering a Navigation DS
This is an open discussion with 5 replies, filed under Troubleshooting.
Search
It's a Symphony bug, regardless of filter, page types use IN
which will never work for AND operations.
Thanks Brendan - I just posted it on the issue tracker.
Line 16 of datasource.navigation.php
looks odd to me:
$types = preg_split('/'.($filtertype == DS_FILTER_AND ? '+' : ',').'s*/', $filter, -1, PREG_SPLIT_NO_EMPTY);
It doesn't look like $filtertype
would ever equal DS_FILTER_AND
and therefore fall back onto the default DS_FILTER_OR
.
I'm slow.
:)
Create an account or sign in to comment.
I'm trying to filter a navigation data source by two values, a static and a dynamic one:
{$ds-sprache}
returns the currently selected language (eitherdeutsch
orenglisch
in my case).I was expecting that
+
will only return pages that have both types attached (navigation
anddeutsch
/englisch
). But it seems always return pages that match the first or the second value. Looking atdatasource.navigation.php
it seems like Symphony is checking, if is should join types byAND
orOR
.I'm a bit lost: am I doing something wrong or is this a Symphony bug.