agon024
agon024

Reputation: 1007

MODX - Template variable that hides post author when checked

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.

Upvotes: 0

Views: 176

Answers (1)

Vasis
Vasis

Reputation: 2281

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

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

Upvotes: 1

Related Questions