We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8471
    • 333 Posts
    Hi, I want to use the filter parameter, but is too difficult for me...
    I have created some pages and I want to show in this pages different news in each one, but I can’t understand ho create a variable to separate news, just like add a tag to news ([News tipe1], [Tipe2] etc...)
    sorry for my very bad English...
      Sorry for my bad English grin
      • 18397
      • 3,250 Posts
      If I understand correctly, are you asking for a tutorial for how to show only certain items with a certain category tv value?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Quote from: edipo at Jan 30, 2006, 01:19 PM

        Hi, I want to use the filter parameter, but is too difficult for me...
        I have created some pages and I want to show in this pages different news in each one, but I can’t understand ho create a variable to separate news, just like add a tag to news ([News tipe1], [Tipe2] etc...)
        sorry for my very bad English...

        Perhaps use the document tree structure itself, have each type of news in its own folder, then specify the folder you want when using the snippet tag. You can even use the snippet tag more than once in a document, in case you want to show more than one type of news on one page.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 8471
          • 333 Posts
          @Mark: yes, I think...
          @Sottwell: ok, but then there is a new problem, posting news in different directories

          Thanks to all
            Sorry for my bad English grin
            • 6726
            • 7,075 Posts
            edipo, I might take some time to make a tuto for just what you need... don’t know when though, quite busy at the moment...

            Anyone has some input to answer my questions ?
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 8471
              • 333 Posts
              Quote from: davidm at Jan 30, 2006, 04:38 PM

              edipo, I might take some time to make a tuto for just what you need...
              Thanks, It would be great! smiley
                Sorry for my bad English grin
                • 6726
                • 7,075 Posts
                Me again.

                I have finally been able to do what I wanted, but not in an elegant or efficient way. It confirms what I suspected : tv filters on TVs with multiples values checkbox do not work.

                Or, rather, it could work but it would mean using a filter with multiple conditions to be tested (in my case, far too many if you consider the number of possibilities with 9 checkboxes... no math whiz don’t remember the formula for permutations and combinations...) : e.g let’s say I want to list all items having Value3 set as true (among 9 possible values for the items) no matter what other checkbox the Item has checked.

                I’d have to test :
                - value3||value1
                - value3||value2
                - value3||value4
                - value3||value5
                - value3||value6
                - value3||value7
                - value3||value8
                - value3||value9

                plus any combination of Items, examples :
                - value3||value1||value2
                - value3||value4||value5||value7
                or even (not likely since my items are employees skills...) :
                - value3||value4||value6||value8||value9
                etc...

                This is due to the fact that having multiple value checked in a checkbox is stored in the DB this way : if value 1 and 6 and 8 are checked, then you’ll have this string as value for the given item : value1||value6||value8. I tried switching to multiple select type for the TV but same problem.

                What I did what take the previous TV named skills (a multiple checkbox TV) and make that 9 TVs :
                - skill1
                - skill2
                ...
                - skill9
                each with a single checkbox.

                And now the exact same snippet calls works smiley

                If I am missing something, please enlighten me !


                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 8471
                  • 333 Posts
                  I have found! I want something like this or this... http://modxcms.com/Designing-the-MODx-Weblog.html
                  but I can’t understand how do this...
                    Sorry for my bad English grin
                    • 18397
                    • 3,250 Posts
                    David,

                    To get the snippet to work with checkbox’s all that needs to be added is an explode line with the parameters || and the current filter item...

                    If you still want that let me know.
                      • 6726
                      • 7,075 Posts
                      Yeah well I sure would like it since it’s way more elegant. And I probably won’t be the only one to want that... could that be made an automatic feature of the snippet ?

                      Anyway, thanks again for your time, Mark smiley

                      Quote from: Mark at Jan 31, 2006, 09:54 AM

                      David, To get the snippet to work with checkbox’s all that needs to be added is an explode line with the parameters || and the current filter item... If you still want that let me know.

                        .: COO - Commerce Guys - Community Driven Innovation :.


                        MODx est l'outil id