We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36687
    • 24 Posts
    I’ve taken over a website written by someone else. I’ve been going through the code trying to understand exactly how everything works. The following chunk is used to display a link to a pdf document.

    [*parent:is=`20`:or:is=`21`:then=`[*pdfDatasheet:isnot=``:then=`<p><a href="[*pdfDatasheet*]" target="_blank" rel="noindex"><img src="[(base_url)]assets/images/pdfDatasheet.gif" border="0" alt="PDF Datasheet" /></a></p> `*][*pdfTolerances:isnot=``:then=`<p><a href="[*pdfTolerances*]" target="_blank" rel="noindex"><img src="[(base_url)]assets/images/pdfTolerance.gif" border="0" alt="Dimensional Tolerances" /></a></p> `*] `*]

    The chunk is included in a template that is used for a whole bunch of product pages. Some products may not have an entry for the [*pdfDatasheet*] template variable. The link doesn’t display when the TV is blank.

    While it looks fairly obvious what’s going on here, I can’t find any documentation for the syntax that is being used here (e.g. :isnot=``) for the logic inside the template variable. Can anyone point me to where this might be documented?
      • 3749
      • 24,544 Posts
      That’s a MODx add-on called PHX. smiley

      http://wiki.modxcms.com/index.php/PHx
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting