How to add controls inside contentblock
Sir/Madam,
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>
</section>
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.
Thanks,
Balaji
Hello,
First, you need to register HomePageHero and MarketSnapshot as widgets in Sitefinity so you can drag and drop them on to a Sitefinity page: 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: docs.sitefinity.com/create-a-template-using-a-master-page
Or, create a custom layout control using section instead of div: docs.sitefinity.com/layout-widgets-create-custom-layout-widgets
I hope this helps.
Regards,
Seth Cleaver
Telerik