I'm recently trying to use Dynamic Content API to retrieve components based on a certain schema from database and then show them on a page. I got the problem that I got all components but the component link didn't work. The basic information are below:
Dynamic Component Template
I used DCP to show these components on the page, so I created a Component Template whose "Output Format" is REL and "Component Presentation based on this Component Template will be" is Published as a Dynamic Assembly, with "Allow on Page Using Dynamic Assembly" checked.
TBB used in this Component Template is like below:
The page URI came out to be tcm:0-0-0, and the area which should show component link was empty.
storage_conf.xml of deployer
Pages are stored in filesystem and others are in database.
Version of SDL
I'm not clear about the reason now. I tried some ideas found on stackexchange but didn't work.
Using ComponentPresentationAssembler Class instead of ComponentPresentationFactory:
Change the Output Format to ASCX Web Control and set ASCX ComponentPresentation stored in filesystem in cd_storage_cong.xml.
I'm confused about why the page URI came to be 0-0-0 and wondering that this may be the reason of component link problem.
- Should the dynamic component presentation be stored in the same location as page?
- If needed, which output format should be selected?
- I saw an answer on this site that ComponentPresentationAssembler class inside Tridion.ContentDelivery.WAI namesapce should be used. Do I need change to that? (I used the same class in Tridion.ContentDelivery.DynamicContent namespace)
Could someone help me solve this problem?