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)
One Presentation template accessing multiple dcr
Pavan
Can we use One Presentation template to access multiple types of dcr?
Find more posts tagged with
Comments
mogoo
yes, you can do this using <iw_load_dcr>
-maureen
LooseCannon
What do you mean by 'multiple types of dcr'?
You can load and process as many DCR's as needed by one .tpl.
manju166
yes we can access multiple types of dcr from one presantation template
example
u can use variables to decalre the path of your dcr's
$dcrWorkareaPath = "y:/default/main/HumanaBranch/CorporateIntranetBranch/WORKAREA/DeveloperWorkarea";
$DCRRelDirPath = "/templatedata/CorporateIntranet/Navigation/data"
and u cna use the XMLParser to access data
example
open(FILE, "$NavDCRFileName");
$DCRFileStream = join('', <FILE>);
close(FILE);
$parser = TeamSite::XMLparser->new();
$rootNode = $parser->parse( $DCRFileStream );
if ($rootNode) {
if ($rootNode->value(*** this is nav dcr data') eq ***this index dcr data) {
hope i didnt confuse u , let me know if u want the exact code
i never tried <iw_load_dcr>, I should check that out
conmgmt
pavan, refer to the post 'using one .tpl across multiple data_types' in this forum (templating) posted by me a few days ago.
Hope it helps..
Pavan
Thanks a lot !!
akshathp
I guess you mean to ask if you could use the same TPL for other categories. Correct me if I got the question wrong.
Yes, you could have it stored in your presntation folder of the other category and have an entry in the templating.cfg. That will pick it. However, this way, you woul dhave to make changes in multiple places once the format in one TPL is changed. If you use the SSIs for headers and footers then these format changes woul dbe minimal.
Also, you could have custom menu item t update TPLs in other categories updated on any change manually.
Hope this helps.
Akshat Pramod Sharma
Interwoven Inc.
Pavan
I mean one .tpl using several DCRs and each of these DCRs are created using different DCTs.
and i guess, as Maureen has pointed <iw_load_dcr> looks a good way to me.
Thanks though.
Pavan
Hi Akshat,
Whay you explained will be a solution of reusing the .tpl file.
But I want to retrieve multiple DCRs in one tpl and each dcr is generated using different DCTs.
But Thanks everybody for the response.