Created
August 26, 2016 21:09
-
-
Save eballisty/43db72e74218f5a85dc266f6d0ed7ce4 to your computer and use it in GitHub Desktop.
Enable Folder Expansion in Mura Site Map
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- This file is part of Mura CMS. | |
Mura CMS is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, Version 2 of the License. | |
Mura CMS is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with Mura CMS. If not, see <http://www.gnu.org/licenses/>. | |
Linking Mura CMS statically or dynamically with other modules constitutes the preparation of a derivative work based on | |
Mura CMS. Thus, the terms and conditions of the GNU General Public License version 2 ("GPL") cover the entire combined work. | |
However, as a special exception, the copyright holders of Mura CMS grant you permission to combine Mura CMS with programs | |
or libraries that are released under the GNU Lesser General Public License version 2.1. | |
In addition, as a special exception, the copyright holders of Mura CMS grant you permission to combine Mura CMS with | |
independent software modules (plugins, themes and bundles), and to distribute these plugins, themes and bundles without | |
Mura CMS under the license of your choice, provided that you follow these specific guidelines: | |
Your custom code | |
• Must not alter any default objects in the Mura CMS database and | |
• May not alter the default display of the Mura CMS logo within Mura CMS and | |
• Must not alter any files in the following directories. | |
/admin/ | |
/tasks/ | |
/config/ | |
/requirements/mura/ | |
/Application.cfc | |
/index.cfm | |
/MuraProxy.cfc | |
You may copy and distribute Mura CMS with a plug-in, theme or bundle that meets the above guidelines as a combined work | |
under the terms of GPL for Mura CMS, provided that you include the source code of that other code when and as the GNU GPL | |
requires distribution of source code. | |
For clarity, if you create a modified version of Mura CMS, you are not obligated to grant this special exception for your | |
modified version; it is your choice whether to do so, or to make such modified version available under the GNU General Public License | |
version 2 without this exception. You may, if you choose, apply this exception to your own modified versions of Mura CMS. | |
---> | |
<!--- Matt, 2 things need to happen: add "-tree" to the class; set this.ulNestedClass to no value on the dspNestedNav method below. The value is set in the theme contentRenderer for MuraBootstrap3. ---> | |
<cfsilent> | |
<cfparam name="objectparams.mapclass" default="mura-site-map"> | |
<cfif objectparams.mapclass eq "mura-site-map"> | |
<cfset objectparams.ulNestedClass=""> | |
<cfset objectparams.ulNestedAttributes=""> | |
<cfset objectparams.liHasKidsClass=""> | |
<cfset objectparams.liHasKidsAttributes=""> | |
<cfset objectparams.aHasKidsClass=""> | |
<cfset objectparams.aHasKidsAttributes=""> | |
<cfelse> | |
<cfset objectparams.ulNestedClass=this.ulNestedClass> | |
<cfset objectparams.ulNestedAttributes=this.ulNestedAttributes> | |
<cfset objectparams.liHasKidsClass=this.liHasKidsClass> | |
<cfset objectparams.liHasKidsAttributes=this.liHasKidsAttributes> | |
<cfset objectparams.aHasKidsClass=this.aHasKidsClass> | |
<cfset objectparams.aHasKidsAttributes=this.aHasKidsAttributes> | |
</cfif> | |
<cfset subnav=' | |
( | |
( | |
ListFind("Page,Folder,Calendar",rsSection.type) | |
and arguments.openCurrentOnly | |
and ListFindNoCase(ArrayToList(this.crumbData[this.navSelfIdx].parentArray), rsSection.contentid) | |
) or ( | |
ListFindNoCase("Page,Folder,Calendar",rsSection.type) | |
and not arguments.openCurrentOnly | |
) | |
) | |
and arguments.currDepth lt arguments.viewDepth | |
and rsSection.type neq "Gallery" | |
and not (rsSection.restricted and not sessionData.mura.isLoggedIn)' /> | |
</cfsilent> | |
<cfoutput> | |
<ul id="svSiteMap" class="#objectparams.mapclass#"> | |
<li class="home"><a href="#variables.$.globalConfig('context')##variables.$.getURLStem(variables.$.event('siteID'),'')#">Home</a>#variables.$.dspNestedNav( | |
contentid='00000000000000000000000000000000001', | |
viewdepth=10, | |
class='', | |
ulNestedClass=objectparams.ulNestedClass, | |
ulNestedAttributes=objectparams.ulNestedAttributes, | |
liHasKidsClass=objectparams.liHasKidsClass, | |
liHasKidsAttributes=objectparams.liHasKidsAttributes, | |
aHasKidsClass=objectparams.aHasKidsClass, | |
aHasKidsAttributes=objectparams.aHasKidsAttributes, | |
subNavExpression=subNav)# | |
</li> | |
</ul> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment