Skip to content

Add "intranet" menu start filter #13

Description

@Timo-Breumelhof

I some cases it's more comfortable for a DNN CMS administrator if the Theme itself "makes" a visual switch based on the root page.
This can be useful for for instance an Intranet based that's located in a page structure inside the main website.

Something like:

Home
News
Products
Intranet
Home
News
Files
Contact

I now mostly add custom code for this to the Them / Skin, but I think it would be useful to use SH for this.


<script runat="server">

	Dim strIntranet = "intranet"
	Dim IsIntra as Boolean = IsIntranet(strIntranet)
	
	Function IsIntranet(Root as String) as Boolean
	
	If PortalSettings.ActiveTab.BreadCrumbs(0).TabName.ToLower = Root.ToLower Then
		Return True
	Else
		Return False
	End If
	
	End Function

</script>

<% If IsIntra = False Then %>
   <h1><a href="//<%=PortalSettings.PortalAlias.HttpAlias%>/<%=strIntranet%>">Main Website</a></h1>
<% Else %>
   <h1><a href="//<%=PortalSettings.PortalAlias.HttpAlias%>/">Intranet</a></h1>
<% End If %>


Note: Also add start id for DDR menu

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions