Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Build user controls in portal mode. View modes: 
User avatar
Member
Member
lwhittemore-emh - 1/29/2014 1:11:01 PM
   
Build user controls in portal mode.
What's the best way to build something like a footer or header section that can be used throughout a site in portal mode. In ASPX i can build a user control and just link to it. Is it possible to do this in the cmsdesk by making a document that can be edited like a page but be able to link to it like a user control?

Hope this makes sense.
Thanks

User avatar
Member
Member
vcarter - 1/29/2014 2:07:58 PM
   
RE:Build user controls in portal mode.
Just use the masterpage. You can add webparts to the zones on the masterpage and they will be inherited throughout your site.
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
CMS.GlobalHelper.ScriptHelper.RegisterJQuery(this.Page);
Page.Header.DataBind();
}

protected void Page_PreRender(object sender, EventArgs e)
{
}
</script>
<cms:CMSWebPartZone ZoneID="JavaScript" runat="server" />
<cms:CMSWebPartZone ZoneID="CookieConsent" runat="server" />
<!--- HEADER--->

<header>
<cms:CMSWebPartZone ZoneID="SupportArea" runat="server" />
</header>
<!--- NAVIGATION --->
<cms:CMSWebPartZone ZoneID="Navigation" runat="server" />
<!--- SUB PAGE CONTENT --->
<cms:CMSWebPartZone ZoneID="SubPageContent" runat="server" />
<!--- FOOTER --->
<footer>
<!--- SITEMAP --->
<cms:CMSWebPartZone ZoneID="SiteMap" runat="server" />
</footer>

That is the basis of how my masterpage is set up. Works like a charm, makes redeployment quick and easy.