OK, I managed to do what I wanted, finally
As I said, I am building a website for a travel agency in which I have a catalog. This catalog contains items which can be sorted either by their location (International, France, Alsace) or their duration (an evening, a day, a week...etc).
I created the following TVs for the items :
- startdate (date)
- duration (dropdown list menu)
- location (dropdown list menu)
- price (number)
- details (richtext)
- is promotion (checkbox)
- is on agent’s shortlist (checkbox)
I have the following structure (each one is a folder in my document tree) :
» Promotions (listed here : all items for which the promotion checkbox TV is checked)
» Idées de vacances (listed here : all items for which the shortlist checkbox TV is checked)
» Sorties d’un jour (listed here : all items which duration is an evening or day long)
» Week-ends (listed here : all items which duration is the week-end)
» Courts séjours (listed here : all items which duration is between two days and a week)
» Longs séjours (listed here : all items which duration is a more than a week)
» Alsace (listed here : all items located in Alsace)
» France (listed here : all items located in France)
» International (listed here : all items located abroad)
I have put all item in a separate folder (id:27).
Here is how I used the &filter parameter. For the "Sorties d’un jour" page :
[!NewsListing? &startID=`27` &tpl=`fiche` &filter=`tvduree,soirée,1` &truncText=`Voir le détail de la fiche` &emptytext=`Désolé, pas de fiche dans cette catégorie`!]
For the "Alsace" page :
[!NewsListing? &startID=`27` &tpl=`fiche` &filter=`tvlieu,Alsace,1` &truncText=`Voir le détail de la fiche` &emptytext=`Désolé, pas de fiche dans cette catégorie`!]
You get the logic.
The problem I had at first was that I didn’t want the TV I was sorting from displayed on the listing page (for instance, didn’t want the duration displayed on duration sorted pages since it was redundant). As Mark pointed out, the TV you sort from has to be in the chunk used as a template. That’s why it didn’t work for me.
What I’ll do is use a css class with display: none for the tv I want masked