jhorsman
8/19/2014 - 8:51 AM

SmartTarget ASP.NET controls example for SmartTarget 2014

SmartTarget ASP.NET controls example for SmartTarget 2014

<smarttarget:Query Publication="tcm:0-69-1" runat="server" SiteEditTagName="span"> 
    <smarttarget:Promotions MaxItems="3" Region="Homepage Promotions" runat="server"> 
        <ItemTemplate> 
            <smarttarget:PromotionalItems runat="server"> 
                <ItemTemplate>
                    <span>
                        <!-- Start Promotion: { "PromotionID": "<%# Eval("promotionID") %>", "RegionID" : "<%# Eval("region") %>"} -->
                         <tridion:ComponentPresentation runat="server" PageURI="tcm:69-6212-64" ComponentURI="<%# Eval(&quot;ComponentUri&quot;) %>" TemplateURI="<%# Eval(&quot;TemplateUri&quot;) %>"/> 
                        <!-- End Promotion -->
                    </span>
                </ItemTemplate> 
            </smarttarget:PromotionalItems> 
        </ItemTemplate> 
        <FallbackContent> 
            <tridion:ComponentPresentation runat="server" PageURI="tcm:69-6212-64" ComponentURI="tcm:69-6196" TemplateURI="tcm:69-6213-32"/>
            <tridion:ComponentPresentation runat="server" PageURI="tcm:69-6212-64" ComponentURI="tcm:69-6197" TemplateURI="tcm:69-6213-32"/>
            <tridion:ComponentPresentation runat="server" PageURI="tcm:69-6212-64" ComponentURI="tcm:69-6198" TemplateURI="tcm:69-6213-32"/>
        </FallbackContent> 
    </smarttarget:Promotions> 
</smarttarget:Query>