Maybe template [[*template]]
[[*template:is=`1`:then=`[[$thischunk]]`]]
-
☆ A M B ☆
- 24,524 Posts
[[[[*template:is=`1`:then=`$thischunk`]]]]
The way you had it written would cause MODX to prepare the chunk even if it wasn't used. This way, the output of the modifier will be the chunk tags, which MODX will process on the next pass through the parser.
-
☆ A M B ☆
- 24,524 Posts
Why not put the button in a chunk, and call it on the page using a TV selector?
TV
Input Type: Checkbox
OK to leave blank: Yes
Input value:
Show Share Button on This Page==[[$yourShareButtonChunkName]]
Output Value (leave blank) unless you want it to appear in more instances than not: then put the chunk call in this field.
Output: Default
discuss.answer
-
☆ A M B ☆
- 24,524 Posts
It should work. Are you changing the `1` to be the ID of the template in question? Of course using parent will also work, as long as they are all the children of that particular parent.
On your template put the name of your TV selector
[[*myShareButton_selector]]