Is there some way to add formatting or markup tags inside a variable?
Use case: I have two topics that use a snippet, but the second one has a extra phrase that could use some formatting. Example:
(In topic 1)
Trees in the garden bear fruit every year, such as red apples.
(In topic 2)
Trees in the garden bear fruit every year, such as red apples and yellow pears.
The snippet is:
Trees in the garden bear fruit every year, such as red apples<%CUSTOM-FRUIT-VARIABLE%>.
In topic 1, the <%CUSTOM-FRUIT-VARIABLE%> has no definition. In topic 2, the <%CUSTOM-FRUIT-VARIABLE%> is:
and yellow pears
THUS: is there a way to put the word "pears" in the topic variable definition for <%CUSTOM-FRUIT-VARIABLE%> in bold? I tried straight-up HTML tags, but that didn't work...
Formatting/markup in variables?
Moderators: Alexander Halser, Tim Green
Formatting/markup in variables?
e
d
============================================
Ed Hawco
d
============================================
Ed Hawco
- Martin Wynne
- Posts: 2656
- Joined: Mon May 12, 2003 3:21 pm
- Location: West of the Severn, UK
Re: Formatting/markup in variables?
Hi Ed,
At first sight, the easiest solution would be to use 2 custom variables.
<%CUSTOM-FRUIT-COLOUR-VARIABLE%> = and yellow
<%CUSTOM-FRUIT-TYPE-VARIABLE%> = pears
If you make <%CUSTOM-FRUIT-TYPE-VARIABLE%> bold in the snippet text, it will appear bold when replaced.
regards,
Martin.
At first sight, the easiest solution would be to use 2 custom variables.
<%CUSTOM-FRUIT-COLOUR-VARIABLE%> = and yellow
<%CUSTOM-FRUIT-TYPE-VARIABLE%> = pears
If you make <%CUSTOM-FRUIT-TYPE-VARIABLE%> bold in the snippet text, it will appear bold when replaced.
regards,
Martin.
- Tim Green
- Site Admin
- Posts: 23181
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Formatting/markup in variables?
No, because even HTML variables will not use the HTML code in topics. They will only insert HTML code in templates, or if they are enclosed in HTML code objects. There are two ways to do this:I tried straight-up HTML tags, but that didn't work...
1) HTML variable enclosed in an HTML code object:
This method only works for HTML output and it's really more complicated than it's worth: Define the variables as HTML variables, and define them like this:
Code: Select all
Trees in the garden bear fruit every year, such as red <strong>apples</strong>.
2) Define a snippet instead of a variable
This method works everywhere, but it isn't variable like variables. So if you want to have different versions in different builds you need to combine it with conditional tags. Instead of defining a variable, define a snippet in an external file, making sure to choose the option that the snippet doesn't start a new paragraph. Then you can have any kind of formatting you like in the snippet:
http://www.helpandmanual.com/help/index ... ippets.htm
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.