Filter all pages where collection xy contains a specific value?
An employee can work for more than one department. Every employee has his own scaffolding page containing this code:
Every department has it's own scaffolding page. And now I want to have a list (on every departement page) off all employees working for this department. Any ideas how can I achieve this??
...
Department(s): {list-data:Department|type=select|multiple=true|blank=true}
{content-options:ancestor=Departments}
{list-data}
...
Every department has it's own scaffolding page. And now I want to have a list (on every departement page) off all employees working for this department. Any ideas how can I achieve this??
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?you might be able to use a grouping-reporter or expanding-reporter or some combination for this ...
-
Inappropriate?Thank's for your hint ki.alam! I looked again at grouping- and expanding-reporter but I still can't imagine how to use these for my issue :(
I’m confused
-
Inappropriate?I'm looking for something like this (the following is not working because data:Departments is a collection):
{report-table}
{content-reporter:type=page|scope=Employees > children}
{text-sort:page:title|order=ascending}
{text-filter:data:Departments > page:title|include=Accounting}
{content-reporter}
{report-column:title=Employee}{report-info:page:title|link=true}{report-column}
{report-column:title=Phone}{report-info:data:Phone}{report-column}
{report-table}
But maybe I'm completly wrong with this idea and there's a absolutley different - easier - way to solve this?? -
Inappropriate?I know there's a better way to convert a collection to a comma separate list of strings ... I just can't find it right now. A dirty dirty hack that could only be thought worthy of publishing at 1:30am is:
{text-filter:data:Departments > object:as string |include=.*Accounting.*}
but you have to turn on the debug suppliers in the plugin administration page.
Hope you find this useful before I wake up and am embarrassed by its ugliness and delete this comment.
I’m sickened by myself.
-
Inappropriate?Hi Katharina,
You will want to use the {collection-filter} here. Something like this:
{collection-filter:data:Departments|matchItems=any}
{text-filter:page:title|include=Accounting}
{collection-filter}
If you're using Reporting 3.1.x or earlier, you will need to add 'reference:value > ' in front of 'page:title'.
1 person says
this answers the question
-
Inappropriate?Really cool ... didn't know that I can nest filters! Hmmm and why didn't I noticed the precene of collection-filter ... have to try this.
Wow it works! It works! Thanks a lot, David!
BTW is it just possible for a collection-filter to have sub-filters? Or is this a standard feature?
I’m excited
-
Inappropriate?It's just the collection filter for now. Not sure how nesting other filters would be useful.
Loading Profile...




EMPLOYEE