5

I am facing the following problem:

On page request we have jsp code which will query the Broker DB, and bring up the Components depending on a Schema (let's say Article).

I am getting correct results (let's say A, B, C, and D are the Components retrieved from the Broker DB). Here is the source from one of the Components:

<tcm_id>tcm:101-38060</tcm_id>
<title>sparkling hill</title>
<summary>crystal element</summary>
<full_text>Hello world</full_text>
<thumbnail>
    <img src="/school/na/images/high-school.jpg" />
</thumbnail>
<url>/school/na/science/highschool.jsp</url>

Now, suppose Component B has one RTF field which has a Component linked say Z. The problem is, this link is not resolved (it is presented as a tridion:ComponetLink tag). So the source for the second Component looks like this:

<tcm_id>tcm: 101-38060</tcm_id>
<title>sparkling hill</title>
<summary>
    <tridion:ComponetLink pageUri="tcm:0-0-0" componentURI="tcm: 101-38060" templateURI="tcm:0-0-0" addanchor="false" linktext="" linkAttributes="I am good &lt;a title=&#34;master card&#34; textOnFail="true"/> swarovishka</a> crystal element
</summary>
<full_text>
    <tridion:ComponetLink pageUri="tcm:0-0-0" componentURI="tcm: 101-38060" templateURI="tcm:0-0-0" addanchor="false" linktext="" linkAttributes="I am good &lt;a title=&#34;master card&#34; textOnFail="true"/> swarovishka</a> hello world      
</full_text>
<thumbnail>
    <img src="/school/na/images/high-school.jpg" />
</thumbnail>
<url>/school/na/science/highschool.jsp</url>

If anybody has any thought on this, please share how it can be resolved?

6

The best way to ensure that dynamic links (in RTF or in the output in general) in Dynamic Component Presentations (DCPs) published to the broker DB are resolved is to use REL as the output format of the dynamic Component Template.

Other output formats published to the database will just return the component presentation contents as plain text. Ensure that you use the ComponentPresentationAssembler class to access the DCP, otherwise the REL code will not be executed.

You must, however ensure that your templates write out the links in valid TCDL format. The Default Finish Actions TBB will take care of this for you so long as you write out links in the format: <a tridion:href="tcm:x-y">my link</a> from your template (RTF content already has links in this format)

4

It looks like you're missing the configuration in web.xml for the tridion: JSP tag.

You should have an entry in your web.xml that reads more-or-less like this:

<jsp-config>
  <taglib>
    <taglib-uri>cd_tags</taglib-uri>
    <taglib-location>/WEB-INF/lib/cd_tags.tld</taglib-location>
 </taglib>
</jsp-config>

You can find the cd_tags.tld file in [Tridion Installer Root]\Content Delivery\resources\tld

BTW: if you copy/pasted this text from your page, it's easy to see why it doesn't work: ComponentLink is misspelled, and Page Uri attribute should be pageURI.

2nd BTW: Using a pageURI of tcm:0-0-0 will make sure that the resulting links are not cacheable. How are you generating this code? It doesn't look like Tridion is doing it (through the LinkResolver TBB), as it would have included the real Page URI instead of tcm:0-0-0.

UPDATE

I finally read properly what you're saying... if you're reading DCPs from the database, then indeed the code is not executed - do as Will suggests and use REL OR publish the DCPs to the file system instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.