8

I have the following code in my DW TBB (partially shown here):

    <!-- TemplateBeginIf cond="Component.Schema.Name='EmployeeTestimonial'" -->
    <li>
        <a tridion:href="@@Component.ID@@" class="puff" >
            <div class="puffimg">
                @@RenderComponentPresentation(Component.Fields.Thumbnail, CTImage)@@        
            <div class="pufflink" style="right: -47px;"></div>
            </div>
            <div class="pufftext">
                <span class="type">@@Component.Fields.FirstName@@</span>&nbsp;@@Component.Fields.Office@@.<br/>
                <div class="years">@@Component.Fields.StartDate@@</div>
            </div>
        </a>
    </li>
<!-- TemplateEndIf -->
<!-- TemplateBeginIf cond="Component.Schema.Name='Office'" -->
<div id="solna" class="office clearfix">
     <div class="officeimg">
        @@RenderComponentPresentation(Component.Fields.Image,CTImage)@@
     </div>
     <div class="officetext">
        <div class="officesquare" id=""></div>
        <p>
            @@Header@@
            <br />
            @@Address@@
        <!-- TemplateBeginIf cond="Component.Fields.Phone != ''" -->
            <br />
            Tel. @@Phone@@
        <!-- TemplateEndIf -->
        </p>
     </div>
</div>
<!-- TemplateEndIf -->

This template is used by a DCP with output format HTML fragment and will be used to show content teaser (Blurbs) of components that are based on different Schemas.

Further, I have another component that will display on the content delivery side a list of those Blurbs DCP.

The solution works well if I don't use <a tridion:href= ... >. However, it will not display any output for those components which template code uses dynamic links as tridion:href. The dynamic links are resolved correctly when running Template Builder but not when retrieving from the Content delivery.

When I test to change the output format of the DCP to REL then it starts to work properly. BUT, I get confused beacause the SDL documentation states regarding the output format for DCPs:

REL (Render Engine Language)... Only select this value if you publish to a Publication Target with its Target Language also set to REL. (See http://goo.gl/LCUlKK - Login required)

The Target language of our Publication is JSP so my question is -- Why does a DCP that uses REL as output format works well on a target publication language JSP?

In our cd_storage_conf.xml (on target publication and upload-folder) we have the following line: <Item typeMapping="ComponentPresentation" storageId="defaultDataFile" itemExtension=".Jsp">

The embedded component that I use to list the DCP Blurbs uses the Content Broker Query API and Dynamic Content APIs to add component presentations.

Thank you in advance for any answer that helps me to better understand the actual relation between output format REL and the target language on publication.

This is the first time I send a question to the StackExchange community. If you need more details I'll try to give them, just ask :) Cheers

1 Answer 1

3

The output format of a Dynamic Component Template overrides the target language of a publication target - that's why it works.

The documentation is perhaps not explicit about this behavior.

To expand on that first sentence... by design, Tridion will allow you to have different output formats within the same publication. Initially (think 10 years ago), output formats would mostly refer to data formats - html, xml, etc - and later Tridion added support for dynamic output formats (JSP, ASP fragment, ASCX and finally REL). Rather than break the initial rule that the same publication could have DCPs with different formats, Tridion just makes sure the DCPs get published and assumes you made the correct choices for your technology. There's nothing stopping you from publishing and ASCX DCP to a Java site, or a JSP presentation to a .NET site (other than the fact that you'll get an error).

1
  • Thank you Nuno! I have a supplementary question (Sorry I'm a newbie without a proper SDL training behind). If I want to use dynamic links in my DW TBB (with tridion:href="tcmid") is it required that I use REL/JSP/ASP as output format on a component template using that DW template in order to get the link properly resolved on Content delivery side? (I use "Default finish actions" default building block at the end of the CT)
    – Estanislao
    Commented Apr 28, 2014 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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