We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51347
    • 82 Posts
    Hello,

    i try to use this "PHP" code in PDO-Template:

    HTML:
    [[!pdoResources? &parents=`2` &tpl=`pdotpl`]]
    


    Chunk "pdotpl":
    [[+pagetitle]]
    [[+longtitle]]
    [[*show:isnot=`yes`:then=``:else=`I SHOW YOU SOMETHING`]]
    


    But it doesn't work (probably because the *show is not a placeholder).

    Do you have any ideas how i can solve this in a different way?

    This question has been answered by Bruno17. See the first response.

    • discuss.answer
      • 4172
      • 5,888 Posts
      this isn't php. This is an output-filter, what you are playing with.

      if this is a TV with name show, you have to add the tvname to includeTVs

      [[!pdoResources? &parents=`2` &tpl=`pdotpl` &includeTVs=`show`]]
      


      and have it in your chunk like

      [[+pagetitle]]
      [[+longtitle]]
      [[+tv.show:isnot=`yes`:then=``:else=`I SHOW YOU SOMETHING`]]


        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 51347
        • 82 Posts
        Sorry, i forget. I use allready &includeTVs=`show` but my chunk was wrong.

        I tried this form:
        [[+show:isnot=`yes`:then=``:else=`I SHOW YOU SOMETHING`]]

        [[*show:isnot=`yes`:then=``:else=`I SHOW YOU SOMETHING`]]


        But thats works, thank you Bruno!
        [[+tv.show:isnot=`yes`:then=``:else=`I SHOW YOU SOMETHING`]]