Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
preformatting
beth66
Isn't there a preformatting tag that outputs the code in the same position you have it in the template?
I have a standard address book template. Some of the values such as phone number aren't required. In the presentation template I have the values ending with a <br /> but if these values are blank in the dcr it has a <br /> in the code as expected. This causes too much empty white space in the output.
<iw_value name='headings.address'/><br/>
<iw_value name='headings.cityStateZip'/><br/>
<iw_value name='headings.phone'/> <br/>
<iw_value name='headings.fax'/><br/>
ideas?
Find more posts tagged with
Comments
jbonifaci
Use a conditional statement and only output the field and the <br> if the field has a value? You could do this in an iw_if or iw_perl tag, your choice. I tend to do my entire tpls within a single iw_perl tag, but if you like using the iw tags, you should be able to do this easily with an iw_if tag.
beth66
I thought there was an easier way to do this with some sort of pre formatting tag. ??
iwovGraduate
Using iw_if tag is trivial. What do you mean by preformatting tag ?
beth66
I know the if statement is trivial but if there is a tag that does this, I will save on code lines.
I remember in our class he mentioned there was a tag that let you output the values in the same way it's in the tpl so :
<iw_value name='headings.address'/>
<iw_value name='headings.cityStateZip'/>
<iw_value name='headings.phone'/>
with the no </br /> needed.
jbonifaci
You can use the html tag
<pre>
, but you're still going to have extra lines if the field has no value.
beth66
ok, I guess there is not way around it.
Can you give me a hand on how to write the if statement?
again this is my code:
<iw_value name='headings.address'/><br />
<iw_value name='headings.cityStateZip'/><br />
<iw_value name='headings.phone'/><br />
<iw_value name='headings.fax'/>
thanks!
iwovGraduate
search the forums for <iw_if
You should find numerous posts regarding this.
You can also look at (besides RTFM) -
http://<your_ts_server>/iw/help/tst/pt
Example templates shipped with TS (iw-home/examples/Templating directory I think)
beth66
thanks, I'll look