Re: short and long descriptions
Posted by
DavidJCobb on
Oct 26, 2011; 3:19am
URL: https://support.nabble.com/short-and-long-descriptions-tp6927296p6931448.html
A regex-based solution could also work. I haven't tested this, though, and I don't know what particular flavor of regex NAML uses. I'd recommend trying this on a test site before editing it into your mains.
For places where the long description should be shown:
<n.regex_replace_all. pattern="\[short_desc\][^\b]+?\[/short_desc\]" replacement=" "><n.node_message_as_html/></n.regex_replace_all.>
For places where the short description should be shown:
<n.regex_replace_all. pattern="\[long_desc\][^\b]+?\[/long_desc\]" replacement=" "><n.node_message_as_html/></n.regex_replace_all.>
Example of how to format your description to work with the above:
[short_desc]This text is not shown for the long description.[/short_desc]
[long_desc]This text is not shown for the short description.[/long_desc]
This text isn't in one of our two fake tags, so it would show for either description.