Try Now
More in this section

Forums / Bugs & Issues / How to add controls inside contentblock

How to add controls inside contentblock

2 posts, 0 answered
  1. Balaji
    Balaji avatar
    8 posts
    13 Nov 2015
    07 Dec 2015
    Link to this post


    I added custom controls in sitefinity cms and able to see & add them in the pagetemplate. But my question here is I need to add couple of htmls to wrap controls in the same row. My current production web page has like below:

        <section class="row">
          <ctrls:HomePageHero ID="ucHomePageHero" runat="server"></ctrls:HomePageHero>
          <ctrls:MarketSnapshot ID="ucMarketSnapshot" runat="server" visiable="false"></ctrls:MarketSnapshot>

    So I need to add    <section class="row"> in the page template before adding custom controls and then need to add </section> after custom controls. Each pages has their own htmls like div, section in between the user controls to size, wrap in a same row, styling.

    How to do this in the sitefinity cms 8.2. Please let me know.



  2. Seth Cleaver
    Seth Cleaver avatar
    24 posts
    02 Aug 2016
    07 Jan
    Link to this post

    First, you need to register HomePageHero and MarketSnapshot as widgets in Sitefinity so you can drag and drop them on to a Sitefinity page: http://docs.sitefinity.com/register-a-new-widget-in-sitefinity-toolbox

    Next order have them contained by specific HTML, in this case section, you need to choose one of two methods:

    Have custom markup in the base masterpage used for the pages with a contentplaceholder inside the section so you can drop the controls into it:  http://docs.sitefinity.com/create-a-template-using-a-master-page
    Or, create a custom layout control using section instead of div: http://docs.sitefinity.com/layout-widgets-create-custom-layout-widgets

    I hope this helps.

    Seth Cleaver
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered