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)
2 html from one tpl
mangetak
We would like to know if its possible to have 2 htmls generated from just one TPL, and one DCR. Below an explanation of the case with an example.
We have a tpl and a DCR which has a reference to another dcr. The main DCR has the information for an article and the referenced one is for the media... This media dcr could be a replicant of paths to diferent video files ie.
When creating the main page (the article one), we want the tpl to load the information for the media dcr thats referenced (by the path), and create a page with the listing of the videos. (each of the videos on the listing will take the user to a final page for that video, already created with the video dcr and tpl)
We have heard of some kind of meta code / tags that can be included into the tpl that allows developers to generate another file apart from the one created by the tpl on running time. Is that correct? If so, where can we get documentation on it and also examples for the developers to get an idea?
Find more posts tagged with
Comments
MattP
your in luck. Probably the best documentation that IWOV has produced is in this area. Take a look at 2 functions. I have used them quite a bit and they work well.
IW_LOAD_DCR
This will allow you to load and process dcrs in a presentation template
IW_OSTREAM
This allows you to output to more than 1 file.
The documentation is on your TS server, at this URL...
http://<your
ts server name>/iw/help/tst/pt/
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
Adam Stoller
Note - with iw_ostream, you will have to manually set the extended attributes on the "other" generated file so that it will behave as a templated-generated-file (if you don't care about that functionality, you don't have to do it)
--fish
(Interwoven Senior Technical Consultant)
rodigz
Hi Fish,
How to set the html files into utf-8? When I preview pages are not in utf-8?
<!-- START BODY -->
<iw_ostream buffer='bodyBuffer'>
<iw_include pt_val='$body_hash{$curr_key}' mode='cwd'>
<![CDATA[
$iw_param{useLinkTargets} = 1;
$iw_param{showPageTitleInHeader} = 1;
]]>
</iw_include>
</iw_ostream>
<!-- END BODY -->
Adam Stoller
RTFM -
http://tsserver/iw/help/tst/pt/TeamSite__PT__iw_ostream.html
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com