We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    Sorry, been working on the new MODx Developer blog. I’ll take a look at it tomorrow.
      • 32847
      • 171 Posts
      Once I am done, I’ll take some time to give an example use too Smiley
      Thanks !
      What kind of exemple do you think?
      Yesterday, I read all the topics about Newslisting and I understood why Mark is Mr Rocket Version grin
        • 6726
        • 7,075 Posts
        OK, I managed to do what I wanted, finally smiley

        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 smiley
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 18397
          • 3,250 Posts
          You can use the hiddentv argument David to allow sorting or filtering of a tv not displaying in the template.
            • 32847
            • 171 Posts
            Sorry to insist Mark but did you have a look on weblink problem?
              • 18397
              • 3,250 Posts
              @xeres : I just completed testing NewsListing (the current release version and my soon to be released version) with Weblinks and experienced no problems whatsoever.

              If you are referring to TV’s and Weblinks then thats for the coding team.
                • 6726
                • 7,075 Posts
                Quote from: Mark at Jan 14, 2006, 01:52 PM

                You can use the hiddentv argument David to allow sorting or filtering of a tv not displaying in the template.

                Thanks I’ll do that then, less cluttered css is always a nice thing smiley
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 32847
                  • 171 Posts
                  If you are referring to TV's and Weblinks then thats for the coding team

                  yes, my problem is with filtering.

                  my soon to be released version

                  grin

                  Thanks
                    • 21595
                    • 159 Posts
                    just I install the new version of this snippet on modx 0.91 and i get this error
                    Parse error: parse error, unexpected ’<’ in
                    efm.lasiate.com/manager/includes/document.parser.class.inc.php(691) : eval()’d code on line 1

                    somme help please.
                    Thanks
                      • 18397
                      • 3,250 Posts
                      I accidentally left the <? at the top of the snippet (I use it to trigger code highlighting in Dreamweaver). Just remove that and all will be well smiley.