The hide tag is a conditional tag and always used as an opening and closing pair, like this…
<txp:hide> …conditional statement… </txp:hide>
The hide tag is used to suppress or postpone the interpretation of all enclosed contents. Use it for comments, temporary concealment of article text parts or non-destructive form changes.
Tag will accept the following attributes (case-sensitive) as well as the global attributes :
- Whether and when to process the enclosed contents. If unset, no tag processing nor output will be done. If set without a value, the contents will be processes but not output. If set to an empty value (
"0"), the contents will be output as is without processing. Finally, a positive value
"n"means process and output on the
- Default: unset.
Example 1: Insert a useful note in a template and define a variable
<txp:hide process> This is a work-around for a bug in Internet Explorer, again <txp:variable name="ie_workaround" value='<txp:output_form form="ie_workaround" />' /> </txp:hide>
Example 2: Comment out part of a form for testing
If you want to try something out to see how it affects the layout without actually deleting the content, wrap it in hide tags:
<div class="entry-content"> <txp:body /> </div> <txp:hide> <address class="vcard author"> <span class="fn"> <txp:author /> </span> </address> <txp:comments_invite wraptag="p" /> </txp:hide>
Renders the body text inside the
<div class="entry-content"> but skips the
<txp:comments_invite /> tags.
process attribute added.