We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2581
    • 10 Posts
    Hi

    Can anyone help me with template vars? I am trying to store a TV called [*hide-article *] but the only time I seem to get it to store anything is if I supply it with a default value and even then it will not let me change it even if selected.

    I want to store this var so I can then use &filter=`hide-article|7|yes` on my home page to hide articles if they are flagged.

    I created the TV as follows:

    Input Type : Radio Options
    Input Option Values : Yes==yes||No==no

    I added the TV [*hide-aricle*] to my news listings page to check what values it was receiving and the only time it sees anything is if I as a default value of yes to the TV.

    Any suggestions are welcome as this is driving me crazy.

    Thanks

    P.S. I have also tried doing this with check boxes to no avail.

      Loving modx but hating too... is that a love hate thing or what?
      • 2581
      • 10 Posts
      I used the following to get this working.

      1) I used [+hide-article+] instead of [*hide-article*] as it was being called in a chunk being used by ditto.
      2) I used &filter=`hide-article,yes,2` for my filtering.

      Hope this helps some other poor soul getting confused.



        Loving modx but hating too... is that a love hate thing or what?