|Number of votes:||1|
If there still are anyone out there using forms maybe this can be of some use.
Scenario is that you have a template with:
If the editor doesn't add values to atleast one of the properties in a row we would end up with a empty bootstrap row which we don't want to.
To avoid having to write codebehind code to handle this I did a webcontrol. The webcontrol checks all inner properties (which must be of type EPiServer:Property) and if all are empty the row isn't rendered.
<Nergard:BootstrapRow CssClass="row" runat="server">
<EPiServer:Property PropertyName="ContentArea" runat="server" CustomTagName="div" CssClass="col-md-6"/>
<EPiServer:Property PropertyName="MainBody" runat="server" CustomTagName="div" CssClass="col-md-6"/ />
You can use both the PageLink and PageLinkPropertyName attributes in the EPiServer:Property if you want to use them.
Code over at GitHub Gist: Code.