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

    I’m extending PHx with the ability to check whether the content of a given PH is a filename of an existing file. For that, I’m coding a custom modifier wich returns 1/true if a file with that name exists in the assets folder or returns 0 if it does not.

    This works quite good when I’m using

    [tt][+myfilename:isfile:is=`1`:then=`<img tag>`:else=`Image not found`+][/tt]

    I’d love to eliminate the [tt]is=`1`[/tt] from above. Is that possible somehow? I don’t want to use the optional parameters for my custom modifier, because that then/else syntax is more accurate, I think (better to read).

    Thx in advance
    Martin