Documentation Center

Displaying Promotion Title and Slogan

This task provides template code examples for getting the Promotion Title and Slogan.

About this task

Getting the Title and Slogan (ASPX)
The following is an example of getting the Promotion Title and Slogan in an ASPX page:
<tcdl:promotions maxItems="20" region="Sidebar">
   <tcdl:itemTemplate>
        <br>
           <b>Title:</b><asp:Label Text=”##Title##” runat="server"/>
           <b>Slogan:</b><asp:Label Text=”##Slogan##” runat="server"/>
        </br>
        <tcdl:promotionalItems>
             <tcdl:itemTemplate> 
                  <tcdl:ComponentPresentation componentURI='##ComponentUri##' TemplateURI='##TemplateUri##' Type='Dynamic'/>
             /tcdl:itemTemplate>
        </tcdl:promotionalItems>
   </tcdl:itemTemplate>
   <tcdl:fallbackContent>... 
   </tcdl:fallbackContent>
</tcdl:promotions>
Getting the Title and Slogan (JSP)
The following is an example of getting the Promotion Title and Slogan in an JSP page:
<tcdl:promotions maxItems="20" region="Sidebar">
    <tcdl:itemTemplate>
       <div class="section">
       <div class="subheader"></div>
       <br>
        <b>Title: </b><c:out value="#{promotion.title}" />
        <b>Slogan: </b><c:out value="#{promotion.slogan}" />
       </br>
       <tcdl:promotionalItems> 
           <tcdl:itemTemplate> 
               <tcdl:ComponentPresentation componentURI='##componentUri##' templateURI='##templateUri##' Type='Dynamic'/> 
           </tcdl:itemTemplate>
       </tcdl:promotionalItems>
    </tcdl:itemTemplate>
    <tcdl:fallbackContent>... 
    </tcdl:fallbackContent>
</tcdl:promotions>