We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51020
    • 670 Posts
    I have a chunk tpl which I want to show a ‘read more’ link if the target page has content.
    If not I want to send them to an external link in a tv

    I tried
    
    [[+content:notempty=`[[~[[id]]]]`:default=`[[+tvLink]]`
    


    But it just goes right to the tvLink regardless of whether the content field on the target resource is filled or not. If I change +content to +introtext it works - but I don’t understand why I can’t use +content for this?

    Any ideas?

    Thank
    Andy

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

    • discuss.answer
      • 4172
      • 5,888 Posts
      you didn't say where this content - placeholder is coming from.
      Is it probably within a getResources tpl-chunk?

      then try
      &includeContent=`1` 
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 51020
        • 670 Posts
        Quote from: Bruno17 at Oct 28, 2017, 04:51 AM
        you didn't say where this content - placeholder is coming from.
        Is it probably within a getResources tpl-chunk?

        then try
        &includeContent=`1` 

        Apologies - guess that would have helped. But yes you are correct. Will try that

        Thanks!
          • 51020
          • 670 Posts
          Quote from: Bruno17 at Oct 28, 2017, 04:51 AM
          you didn't say where this content - placeholder is coming from.
          Is it probably within a getResources tpl-chunk?

          then try
          &includeContent=`1` 

          That worked thanks - I forgot content isn’t included by default in getResources.
          THANKS!