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)
Livesite component fetching from diff DCR's
buddha1
I got a peculiar requirement.
I have a header component. and one of the links is not common and should change per page. Instead of creating different DCR's for page, can i create a single DCR, where the header component can include the DCR based on the page?
eg: right now we have
page1---header component--dcr1
page2 --- header component --dcr2
can it be like
page1---header component--dcr
page2 --- header component --dcr
dcr has the values( dcr1 and dcr2) and based on the page1/page2...the dcr should take dcr1/dcr2 filed
Thanks Gurus
Buddha
Find more posts tagged with
Comments
RonaldV
Hi,
this is possible by using an external that parses the dcr and returns the required data.
dobrien
Note that technically the DTD for externals does not allow inclusion of one DCR in another. I would avoid this syntax.
Can you solve it by having the component reference 2 DCRs? One with the base links, and one with the custom link? Or 1 DCR for the base links, and maybe a Page Link datum for the custom link? You could also define a number input to indicate the position of the custom link.
krishna_kumar
If I have understood your problem clearly, the following solution would be helpful.
In the DCR, create a replicant. Each replicant has a field 'page name' and other fields you require. So for each page you will have one container in that DCR.
Next, when you parse the DCR in the component use the $PAGE_LINK token or any other page token based on your requirement and get the page name and find the relevant value in the container and proceed.
Hope this helps
cool_rash
This can be achived if you pass the value (Dummy Value) of page1 in the URL read it using an exrternal java and append the value to the xml that is getting formed in the "content xml" part. Then in the xslt part you can compare based on the page parameter passed in the URL. We have done it in our project and it works fine. You can google for various methods available to get the value of the string from URL.