Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Text file output by Presentation Template?
Leo
Hi,
I am looking for some solution urgently! Could anyone throw some light on this. THANKS!!!
I ave a Presentation template which generates the output as a text file. No doubt, all the contents that I enter thru the DCR are appear in the output file, but it looks totally messed up in terms of alignment! Also, I see all the HTML tags are appearing in the output.
How do I get away with this and get a clean formatted aligned output in a text file? Rather, How do I control the alignment to be effected in my output text file thru my Presentation Template?
This is how I've coded in my PT
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*==*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="Email NewsLetter Presentation Template">
<![CDATA[
My Sample Newsletter
]]>
<iw_value name='dcr.Date'/>
<![CDATA[
DEAR %TITLE% %FAMILYNAME%
]]>
<iw_iterate var='SectionParagraphs' list='dcr.SectionParagraphs'>
<iw_if expr="{iw_value name='SectionParagraphs.Sub Header'/}ne ''">
<iw_then>
<![CDATA[
<iw_value name='SectionParagraphs.Sub Header'/>
<iw_value name='SectionParagraphs.Body Text'/>
<iw_value name='SectionParagraphs.Fine Print'/>
]]>
</iw_then>
</iw_if>
</iw_iterate>
<![CDATA[
--------------------------------------------------------------
Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine.
Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine.
Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine.
Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine.
Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine.
Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine.
Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine. Text that appear fine.
]]>
</iw_pt>
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*==*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Is this the way PT to be coded for the text output?
The part that is displayed messy is the one that is inside the <iw_iterate> block. The content for Sub Header & Body Text is entered in the DCR thru Visualformat and I feel that could be the reason for the HTML tags appearing in the output file - Correct me if I'm wrong.
Any soultions?
TIA
- Leo
Find more posts tagged with
Comments
Lex
There are ways to remove all the HTML tags in a Visual Format Editor control. It might take a bit of work, but you can use the <clean> element in the VisualFormatConfig.xml file to remove any HTML tags you would like to. However, if you truly don't want any HTML tags at all and you're outputting to a text file, why use the VFE at all? Just use a <textarea/> and you avoid the problem all together. You could also write a small perl routine containing some regex to remove the tags on the presentation template side if there is somewhere else that you
are
using the HTML tags.
Darryl Luther
darryl.luther@weyerhaeuser.com
Senior Web Analyst
Weyerhaeuser