1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Partial content is being automatically open / closed on "Content Block" widget

Partial content is being automatically open / closed on "Content Block" widget

3 posts, 0 answered
  1. Gonzalo
    Gonzalo avatar
    2 posts
    Registered:
    24 Mar 2011
    24 Mar 2011
    Link to this post
    Hello everyone,

    Here is my issue: On a page I got a "Content Block" widget with this HTML on it:
    <div class="style1">
    <div class="style2">
    [Some HTML Suff here]

    Then I add a custom widget that renders it own HTML

    Then I add another content block to close the divs from the first content block:
    </div>
    </div>

    When I save the page the first content block gets magically the closing tags
    <div class="style1">
    <div class="style2">
    [Some HTML Suff here]
    </div>
    </div>

    And the second content block get the opening tags.
    <div>
     <div>
     </div>
    </div>


    Is there any way to render content in a more granular way, specially if that page gets partial content as I showed?
  2. Andres Vettori
    Andres Vettori avatar
    1 posts
    Registered:
    10 Sep 2009
    24 Mar 2011
    Link to this post
    So, in this case I guess that what is needed is Widget nesting.
    Is there a way to do that?
  3. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    29 Mar 2011
    Link to this post
    Hi Andres ,

    You could use master pages to achieve the required layout:
    .master
    <div class="style1">
        <div class="style2">
            <asp:ContentPlaceHolder ID="htmlPlaceHolder" runat="server" />
            <asp:ContentPlaceHolder ID="widgetPlaceHolder" runat="server" />
        </div>
    </div>

    htmlPlaceHolder - it will hold the Content Block containing the HTML staff
    widgetPlaceHolder - it will hold the custom widget

    You could even use one placeholder for the Content Block and the widget.

    Best wishes,
    Pepi
    the Telerik team
3 posts, 0 answered