MODX - Template variable that hides post author when checked

177 Views Asked by At

So I am using the add-on articles to create a press release section on my site. I need to create a template variable that is a check box and if checked it will NOT show the post author:

[[*publishedby:userinfo=`username`]]

What is the best way for me to do this.

1

There are 1 best solutions below

2
Vasis On BEST ANSWER

If your checkbox tv input option value like "Hide==1" then use output filter like this:

[[*your_tv:ne=`1`:then=`[[*publishedby:userinfo=`username`]]`]]