Backend Widget Template, adding a DynamicContentView in Rela

Posted by Community Admin on 04-Aug-2018 06:29

Backend Widget Template, adding a DynamicContentView in Related Mode

All Replies

Posted by Community Admin on 05-Feb-2013 00:00

I have a widget template in my backend...and inside that template I need to insert the markup such that another DynamicContentView (of a different type) will render the related details.  I'm just unsure of the fields to give it...it renders nothing onto the page, but a breakpoint shows it's clearly checking something.

<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.DynamicModules.Web.UI.Frontend" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="SitefinityWebApp" Namespace="SitefinityWebApp.Usercontrols.Widgets.Taxonomy.SimpleTaxa" TagPrefix="gs" %>
<%@ Register Assembly="SitefinityWebApp" Namespace="SitefinityWebApp.Usercontrols.Widgets.NutritionData" TagPrefix="gs" %>
<%@ Register TagPrefix="gs" Namespace="SitefinityWebApp.Usercontrols.Widgets" Assembly="SitefinityWebApp" %>
<%@ Register TagPrefix="gs" Namespace="SitefinityWebApp.Code.Controls.DynamicViews" Assembly="SitefinityWebApp" %>
   
<sf:DynamicDetailContainer id="detailContainer" runat="server">
    <LayoutTemplate>
      <div class="sf_cols">
        <div class="sf_colsOut sf_2cols_1_67">
            <div class="sf_colsIn sf_2cols_1in_67" id="ctl20_C007_Col01">
                <div class="sfitemDetails article">
 
                   <h1><%# Eval("Title") %></h1>
 
                   <h2>Summary</h2>
                   <div><%# Eval("Summary")%></div>
              </div>
            </div>
        </div>
        <div class="sf_colsOut sf_2cols_2_33">
            <div class="sf_colsIn sf_2cols_2in_33" id="ctl20_C007_Col00">
                <div class="related-content">
                  <gs:RecipeDynamicContentView runat="server" DefaultMasterTemplateKey="e89ff847-4706-4de9-9af3-891a182bbffd" RelatedDataFieldName="FeaturedRecipes" RelatedDataTypeName="Telerik.Sitefinity.DynamicTypes.Model.Articles.Article" /> 
                </div>
            </div>
        </div>
    </div>
    </LayoutTemplate>
</sf:DynamicDetailContainer>
<asp:PlaceHolder ID="socialOptionsContainer" runat="server"></asp:PlaceHolder>

...ideas?  It shouldn't be because it's nested in a DynamicDetailContainer (I would think).  The control when in related mode should be rendering based on the data in the URL.

This thread is closed