/requirements/mura/content/contentRenderer.cfc
https://github.com/ngocthanhit/MuraCMS · ColdFusion CFScript · 1012 lines · 872 code · 140 blank · 0 comment · 5 complexity · 0ea19d27a7cff6f914a4a14f0f21f29f MD5 · raw file
- <!--- 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 that communicate with Mura CMS solely
- through modules packaged as Mura CMS plugins and deployed through the Mura CMS plugin installation API,
- provided that these modules (a) may only modify the �/trunk/www/plugins/ directory through the Mura CMS
- plugin installation API, (b) must not alter any default objects in the Mura CMS database
- and (c) must not alter any files in the following directories except in cases where the code contains
- a separately distributed license.
-
- /trunk/www/admin/
- /trunk/www/tasks/
- /trunk/www/config/
- /trunk/www/requirements/mura/
-
- You may copy and distribute such 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.
- --->
- <cfcomponent extends="mura.cfobject" output="false">
-
- <cfset this.navOffSet=0/>
- <cfset this.navDepthLimit=1000/>
- <cfset this.navParentIdx=2/>
- <cfset this.navGrandParentIdx=3/>
- <cfset this.navDepthAdjust=0/>
- <cfset this.navSelfIdx=1/>
- <cfset this.jslib="prototype"/>
- <cfset this.jsLibLoaded=false/>
- <cfset this.longDateFormat="long"/>
- <cfset this.shortDateFormat="short"/>
- <cfset this.showMetaList="jpg,jpeg,png,gif">
- <cfset this.imageInList="jpg,jpeg,png,gif">
- <cfset this.directImages=true/>
- <cfset this.personalization="user">
- <cfset this.showAdminToolBar=true/>
- <cfset this.showMemberToolBar=true/>
- <cfset this.showEditableObjects=true/>
- <!--- renderHTMLHead has been deprecated in favor of renderHTMLQueues---->
- <cfset this.renderHTMLHead=true/>
- <cfset this.renderHTMLQueues=true/>
- <cfset this.enableMuraTag=getConfigBean().getEnableMuraTag() />
- <cfset this.crumbdata=arrayNew(1)/>
- <cfset this.listFormat="dl">
- <cfset this.headline="h2"/>
- <cfset this.subHead1="h3"/>
- <cfset this.subHead2="h4"/>
- <cfset this.subHead3="h5"/>
- <cfset this.subHead4="h6">
-
- <cffunction name="init" returntype="any" access="public" output="false">
- <cfargument name="event" required="true" default="">
-
- <cfif isObject(arguments.event)>
- <cfset variables.event=arguments.event>
- <cfelse>
- <cfset variables.event=createObject("component","mura.servletEvent")>
- </cfif>
- <cfset variables.$=variables.event.getValue("muraScope")>
- <cfset variables.mura=$>
-
- <cfif request.muraExportHtml>
- <cfset this.showEditableObjects=false>
- <cfset this.showAdminToolBar=false>
- <cfset this.showMemberToolBar=false>
- </cfif>
-
- <cfreturn this />
- </cffunction>
-
- <cffunction name="getHeaderTag" returntype="string" output="false">
- <cfargument name="header">
- <cfif listFindNoCase("headline,subHead1,subHead2,subHead3,subHead4",arguments.header)>
- <cfreturn this["#arguments.header#"]/>
- <cfelse>
- <cfreturn "Invalid Argument. Must be one of 'headline, subHead1, subHead2, subHead3, subHead4'">
- </cfif>
- </cffunction>
-
- <cffunction name="setJsLib" returntype="void" output="false">
- <cfargument name="jsLib">
- <cfset this.jsLib=arguments.jsLib />
- </cffunction>
-
- <cffunction name="getJsLib" returntype="string" output="false">
- <cfreturn this.jsLib />
- </cffunction>
-
- <cffunction name="setRenderHTMLQueues" returntype="void" output="false">
- <cfargument name="renderHTMLQueues">
- <cfset this.renderHTMLQueues=arguments.renderHTMLQueues />
- </cffunction>
-
- <cffunction name="getRenderHTMLQueues" returntype="string" output="false">
- <cfreturn this.renderHTMLQueues and this.renderHTMLHead />
- </cffunction>
-
- <cffunction name="setRenderHTMLHead" returntype="void" output="false" hint="This is deprecated.">
- <cfargument name="renderHTMLHead">
- <cfset this.renderHTMLQueues=arguments.renderHTMLHead />
- </cffunction>
-
- <cffunction name="getRenderHTMLHead" returntype="string" output="false" hint="This is deprecated.">
- <cfreturn this.renderHTMLQueues />
- </cffunction>
-
- <cffunction name="setShowAdminToolBar" returntype="void" output="false">
- <cfargument name="showAdminToolBar">
- <cfset this.showAdminToolBar=arguments.showAdminToolBar />
- </cffunction>
-
- <cffunction name="getShowAdminToolBar" returntype="string" output="false">
- <cfreturn this.showAdminToolBar />
- </cffunction>
-
- <cffunction name="getPersonalization" returntype="string" output="false">
- <cfreturn this.personalization />
- </cffunction>
-
- <cffunction name="getPersonalizationID" returntype="string" output="false">
- <cfif getPersonalization() eq "user">
- <cfreturn session.mura.userID />
- <cfelse>
- <cfif not structKeyExists(cookie,"pid")>
- <cfcookie name="pid" expires="never" value="#application.utility.getUUID()#">
- </cfif>
- <cfreturn cookie.pid />
- </cfif>
- </cffunction>
-
- <cffunction name="getListFormat" returntype="string" output="false">
- <cfreturn this.listFormat />
- </cffunction>
-
- <cffunction name="setListFormat" returntype="string" output="false">
- <cfargument name="listFormat">
- <cfset this.listFormat=arguments.listFormat>
- <cfreturn this/>
- </cffunction>
-
- <cffunction name="loadJSLib" returntype="void" output="false">
- <cfif not this.jsLibLoaded>
- <cfswitch expression="#getJsLib()#">
- <cfcase value="jquery">
- <cfset addToHTMLHeadQueue("jquery.cfm")>
- </cfcase>
- <cfdefaultcase>
- <cfset addToHTMLHeadQueue("prototype.cfm")>
- <cfset addToHTMLHeadQueue("scriptaculous.cfm")>
- </cfdefaultcase>
- </cfswitch>
- </cfif>
- </cffunction>
-
- <cffunction name="loadShadowboxJS" returntype="void" output="false">
- <cfif not cookie.mobileFormat>
- <cfset loadJSLib() />
- <cfswitch expression="#getJsLib()#">
- <cfcase value="jquery">
- <cfset addToHTMLHeadQueue("shadowbox-jquery.cfm")>
- </cfcase>
- <cfdefaultcase>
- <cfset addToHTMLHeadQueue("shadowbox-prototype.cfm")>
- </cfdefaultcase>
- </cfswitch>
- <cfset addToHTMLHeadQueue("shadowbox.cfm")>
- </cfif>
- </cffunction>
-
- <cffunction name="setLongDateFormat" returntype="void" output="false">
- <cfargument name="longDateFormat">
- <cfset this.longDateFormat=arguments.longDateFormat />
- </cffunction>
-
- <cffunction name="getLongDateFormat" returntype="string" output="false">
- <cfreturn this.longDateFormat />
- </cffunction>
-
- <cffunction name="setShortDateFormat" returntype="void" output="false">
- <cfargument name="shortDateFormat">
- <cfset this.shortDateFormat=arguments.shortDateFormat />
- </cffunction>
-
- <cffunction name="getShortDateFormat" returntype="string" output="false">
- <cfreturn this.shortDateFormat />
- </cffunction>
-
- <cffunction name="setNavOffSet" returntype="void" output="false">
- <cfargument name="navOffSet">
- <cfif not event.getValue('contentBean').getIsNew()>
- <cfset this.navOffSet=arguments.navOffSet />
- </cfif>
- </cffunction>
-
- <cffunction name="setNavDepthLimit" returntype="void" output="false">
- <cfargument name="navDepthLimit">
-
- <cfset this.navDepthLimit=arguments.navDepthLimit />
-
- <cfif arrayLen(this.crumbdata) gt this.navDepthLimit >
- <cfset this.navDepthAdjust=arraylen(this.crumbdata)-this.navDepthLimit />
- <cfset this.navGrandParentIdx= 3 + this.navDepthAdjust />
- <cfset this.navParentIdx=2 + this.navDepthAdjust />
- <cfset this.navSelfIdx= 1 + this.navDepthAdjust />
- </cfif>
-
- </cffunction>
-
- <cffunction name="showItemMeta" returntype="any" output="false">
- <cfargument name="fileExt">
- <cfif listFind(this.showMetaList,lcase(arguments.fileExt))>
- <cfreturn 1>
- <cfelse>
- <cfreturn event.getValue('showMeta')>
- </cfif>
- </cffunction>
-
- <cffunction name="showImageInList" returntype="any" output="false">
- <cfargument name="fileExt">
- <cfreturn listFind(this.imageInList,lcase(arguments.fileExt))>
- </cffunction>
-
- <cffunction name="allowLink" output="false" returntype="boolean">
- <cfargument name="restrict" type="numeric" default=0>
- <cfargument name="restrictgroups" type="string" default="" />
- <cfargument name="loggedIn" type="numeric" default=0 />
- <cfargument name="rspage" type="query" />
-
- <cfset var allowLink=true>
- <cfset var G = 0 />
- <cfif arguments.loggedIn and (arguments.restrict)>
- <cfif arguments.restrictgroups eq '' or listFind(session.mura.memberships,'S2IsPrivate;#application.settingsManager.getSite(event.getValue('siteID')).getPrivateUserPoolID()#') or listFind(session.mura.memberships,'S2')>
- <cfset allowLink=True>
- <cfelseif arguments.restrictgroups neq ''>
- <cfset allowLink=False>
- <cfloop list="#arguments.restrictgroups#" index="G">
- <cfif listFind(session.mura.memberships,'#G#;#application.settingsManager.getSite(event.getValue('siteID')).getPublicUserPoolID()#;1')>
- <cfset allowLink=true>
- </cfif>
- </cfloop>
- </cfif>
- </cfif>
-
- <cfreturn allowLink>
- </cffunction>
-
- <cffunction name="getTopId" output="false" returntype="string">
- <cfargument name="useNavOffset" required="true" default="false"/>
- <cfset var id="homepage">
- <cfset var topId="">
- <cfset var offset=1>
-
- <cfif arguments.useNavOffset>
- <cfset offset=1+this.navOffset/>
- </cfif>
-
- <cfif arrayLen(this.crumbdata) gt offset>
- <cfset topID = replace(getCrumbVarByLevel("filename",offset),"_"," ","ALL")>
- <cfset topID = setCamelback(topID)>
- <cfset id = Left(LCase(topID), 1)>
- <cfif len(topID) gt 1>
- <cfset id=id & Right(topID, Len(topID)-1)>
- </cfif>
- </cfif>
-
- <cfif event.getValue('contentBean').getIsNew() eq 1>
- <cfset id = "fourzerofour">
- </cfif>
-
- <cfreturn id>
- </cffunction>
-
- <cffunction name="getTopVar" output="true" returntype="string">
- <cfargument name="topVar" required="true" default="" type="String">
- <cfargument name="useNavOffset" required="true" type="boolean" default="false">
- <cfset var theVar="">
- <cfset var offset=1>
-
- <cfif arguments.useNavOffset>
- <cfset offset=offset+this.navOffset/>
- </cfif>
-
- <cfreturn getCrumbVarByLevel(arguments.topVar,offset)>
-
- </cffunction>
-
- <cffunction name="getCrumbVarByLevel" output="false" returntype="string">
- <cfargument name="theVar" required="true" default="" type="String">
- <cfargument name="level" required="true" type="numeric" default="1">
-
- <cfif arrayLen(this.crumbData) gt arguments.level>
- <cfreturn this.crumbData[arrayLen(this.crumbData)-arguments.level][arguments.theVar]>
- <cfelse>
- <cfreturn "">
- </cfif>
-
- </cffunction>
-
- <cffunction name="dspZoom" returntype="string" output="false">
- <cfargument name="crumbdata" required="yes" type="array">
- <cfargument name="fileExt" type="string" default="">
- <cfargument name="ajax" type="boolean" default="false">
- <cfset var content = "">
- <cfset var locked = "">
- <cfset var lastlocked = "">
- <cfset var crumbLen=arrayLen(arguments.crumbdata)>
- <cfset var I = 0 />
- <cfset var anchorString="">
-
- <cfsavecontent variable="content">
- <cfoutput>
- <ul class="navZoom">
- <cfloop from="#crumbLen#" to="2" index="I" step="-1">
- <cfsilent>
- <cfif arguments.crumbdata[i].restricted eq 1><cfset locked="Locked"></cfif>
- </cfsilent>
- <li class="#renderIcon(arguments.crumbdata[i].type,arguments.fileExt)##locked#">
- <a <cfif arguments.ajax>
- href="" onclick="return loadSiteManager('#arguments.crumbdata[I].siteid#','#arguments.crumbdata[I].contentid#','00000000000000000000000000000000000','','','#arguments.crumbdata[I].type#',1);"
- <cfelse>
- href="#application.configBean.getContext()#/admin/index.cfm?fuseaction=cArch.list&siteid=#arguments.crumbdata[I].siteid#&topid=#arguments.crumbdata[I].contentid#&moduleid=00000000000000000000000000000000000"
- </cfif>>#HTMLEditformat(arguments.crumbdata[I].menutitle)#</a> »</li>
- </cfloop>
- <cfsilent>
- <cfif locked eq "Locked" or arguments.crumbdata[1].restricted eq 1>
- <cfset lastlocked="Locked">
- </cfif>
- </cfsilent>
- <li class="#renderIcon(arguments.crumbdata[1].type,arguments.fileExt)##lastlocked#"><strong><cfif arguments.crumbdata[1].type eq 'Page' or arguments.crumbdata[1].type eq 'Portal' or arguments.crumbdata[1].type eq 'Calendar'>
- <a <cfif arguments.ajax>
- href="" onclick="return loadSiteManager('#arguments.crumbdata[1].siteid#','#arguments.crumbdata[1].contentid#','00000000000000000000000000000000000','','','#arguments.crumbdata[1].type#',1);"
- <cfelse>
- href="#application.configBean.getContext()#/admin/index.cfm?fuseaction=cArch.list&siteid=#arguments.crumbdata[1].siteid#&topid=#arguments.crumbdata[1].contentid#&moduleid=00000000000000000000000000000000000"
- </cfif>>#HTMLEditformat(arguments.crumbdata[1].menutitle)#</a><cfelse><a href="#application.configBean.getContext()#/admin/index.cfm?fuseaction=cArch.list&siteid=#arguments.crumbdata[1].siteid#&topid=#arguments.crumbdata[1].parentid#&moduleid=00000000000000000000000000000000000">#HTMLEditformat(crumbdata[1].menutitle)#</a></cfif></strong></li></ul>
-
- </cfoutput>
- </cfsavecontent>
-
- <cfreturn content />
- </cffunction>
-
- <cffunction name="dspZoomNoLinks" returntype="string" output="false">
- <cfargument name="crumbdata" required="yes" type="array">
- <cfargument name="fileExt" type="string" default="">
- <cfset var content = "">
- <cfset var locked = "">
- <cfset var lastlocked = "">
- <cfset var crumbLen=arrayLen(arguments.crumbdata)>
- <cfset var I = 0 />
- <cfsavecontent variable="content">
- <cfoutput>
- <ul class="navZoom">
- <cfloop from="#crumbLen#" to="2" index="I" step="-1">
- <cfif arguments.crumbdata[i].restricted eq 1><cfset locked="Locked"></cfif>
- <li class="#renderIcon(arguments.crumbdata[i].type,arguments.fileExt)##locked#">#HTMLEditformat(arguments.crumbdata[I].menutitle)# »</li>
- </cfloop><cfif locked eq "Locked" or arguments.crumbdata[1].restricted eq 1><cfset lastlocked="Locked"></cfif><li class="#renderIcon(arguments.crumbdata[1].type,arguments.fileExt)##lastlocked#"><strong><cfif arguments.crumbdata[1].type eq 'Page' or arguments.crumbdata[1].type eq 'Portal' or arguments.crumbdata[1].type eq 'Calendar'>#HTMLEditformat(arguments.crumbdata[1].menutitle)#<cfelse>#HTMLEditformat(crumbdata[1].menutitle)#</cfif></strong></li></ul></cfoutput></cfsavecontent>
- <cfreturn content />
- </cffunction>
-
- <cffunction name="dspNestedNav" output="false" returntype="string">
- <cfargument name="contentid" type="string" >
- <cfargument name="viewDepth" type="numeric" required="true" default="1">
- <cfargument name="currDepth" type="numeric" required="true" default="1">
- <cfargument name="type" type="string" default="default">
- <cfargument name="today" type="date" default="#now()#">
- <cfargument name="class" type="string" default="">
- <cfargument name="querystring" type="string" default="">
- <cfargument name="sortBy" type="string" default="orderno">
- <cfargument name="sortDirection" type="string" default="asc">
- <cfargument name="context" type="string" default="#application.configBean.getContext()#">
- <cfargument name="stub" type="string" default="#application.configBean.getStub()#">
- <cfargument name="categoryID" type="string" default="">
- <cfargument name="relatedID" type="string" default="">
- <cfargument name="rs" required="true" default="">
- <cfargument name="subNavExpression" required="true" default="">
-
- <cfset var rsSection=arguments.rs>
- <cfset var adjust=0>
- <cfset var current=0>
- <cfset var link=''>
- <cfset var itemClass=''>
- <cfset var isCurrent=false>
- <cfset var nest=''>
- <cfset var subnav=false>
- <cfset var theNav="">
-
- <cfif not isQuery(rsSection)>
- <cfset rsSection=application.contentGateway.getKids('00000000000000000000000000000000000',event.getValue('siteID'),arguments.contentid,arguments.type,arguments.today,50,'',0,arguments.sortBy,arguments.sortDirection,arguments.categoryID,arguments.relatedID)>
- </cfif>
-
- <cfif rsSection.recordcount and ((event.getValue('r').restrict and event.getValue('r').allow) or (not event.getValue('r').restrict))>
- <cfset adjust=rsSection.recordcount>
- <cfsavecontent variable="theNav">
- <cfoutput>
- <ul #iif(arguments.class neq '',de(' class="#arguments.class #"'),de(''))#><cfloop query="rsSection"><cfif allowLink(rssection.restricted,rssection.restrictgroups,event.getValue('r').loggedIn)><cfsilent>
-
- <cfset current=current+1>
- <cfset nest=''>
-
- <cfif len(arguments.subNavExpression)>
- <cfset subnav=evaluate(arguments.subNavExpression)>
- <cfelse>
- <cfset subnav=(((ListFind("Page,Portal,Calendar",rsSection.type)) and arguments.class eq 'navSecondary' and (this.crumbData[this.navSelfIdx].contentID eq rsSection.contentid or this.crumbData[this.navSelfIdx].parentID eq rsSection.contentid) ) or ((listFindNoCase("Page,Calendar",rsSection.type)) and arguments.class neq 'navSecondary')) and arguments.currDepth lt arguments.viewDepth and rsSection.type neq 'Gallery' and not (rsSection.restricted and not session.mura.isLoggedIn) >
- </cfif>
-
- <cfif subnav>
- <cfset nest=dspNestedNav(rssection.contentid,arguments.viewDepth,arguments.currDepth+1,iif(rssection.type eq 'calendar',de('fixed'),de('default')),now(),'','',rsSection.sortBy,rsSection.sortDirection,arguments.context,arguments.stub,arguments.categoryID,arguments.relatedID,"",arguments.subNavExpression) />
- </cfif>
-
- <cfset itemClass=iif(current eq 1,de('first'),de(iif(current eq adjust,de('last'),de('')))) />
- <cfset isCurrent=listFind(event.getValue('contentBean').getPath(),"#rsSection.contentid#") />
-
- <cfif isCurrent>
- <cfset itemClass=listAppend(itemClass,"current"," ")>
- </cfif>
-
- <cfset link=addlink(rsSection.type,rsSection.filename,rsSection.menutitle,rsSection.target,rsSection.targetParams,rsSection.contentid,event.getValue('siteID'),arguments.querystring,arguments.context,arguments.stub)>
- </cfsilent>
- <li<cfif len(itemClass)> class="#itemClass#"</cfif>>#link#<cfif subnav and find("<li",nest)>#nest#</cfif></li><cfelse><cfset adjust=adjust-1></cfif></cfloop>
- </ul></cfoutput>
- </cfsavecontent>
- </cfif>
- <cfreturn theNav />
- </cffunction>
-
- <cffunction name="dspCrumblistLinks" output="false" returntype="string">
- <cfargument name="id" type="string" default="crumblist">
- <cfargument name="separator" type="string" default="">
- <cfset var thenav="" />
- <cfset var theOffset=arrayLen(this.crumbdata)- this.navOffSet />
- <cfset var I = 0 />
- <cfif arrayLen(this.crumbdata) gt (1 + this.navOffSet)>
- <cfsavecontent variable="theNav">
- <cfoutput><ul id="#arguments.id#">
- <cfloop from="#theOffset#" to="1" index="I" step="-1">
- <cfif I neq 1>
- <li class="#iif(I eq theOffset,de('first'),de(''))#">
- <cfif i neq theOffset>#arguments.separator#</cfif>
- #addlink(this.crumbdata[I].type,this.crumbdata[I].filename,this.crumbdata[I].menutitle,'_self','',this.crumbdata[I].contentid,this.crumbdata[I].siteid,'',application.configBean.getContext(),application.configBean.getStub(),application.configBean.getIndexFile(),event.getValue('showMeta'),0)#</li>
- <cfelse>
- <li class="#iif(arraylen(this.crumbdata),de('last'),de('first'))#">
- #arguments.separator##addlink(this.crumbdata[1].type,this.crumbdata[1].filename,this.crumbdata[1].menutitle,'_self','',this.crumbdata[1].contentid,this.crumbdata[1].siteid,'',application.configBean.getContext(),application.configBean.getStub(),application.configBean.getIndexFile(),event.getValue('showMeta'),0)#
- </li>
- </cfif>
- </cfloop>
- </ul></cfoutput>
- </cfsavecontent>
- </cfif>
-
- <cfreturn trim(theNav)>
- </cffunction>
-
- <cffunction name="renderIcon" returntype="string" output="false">
- <cfargument name="type" type="string" default="">
- <cfargument name="fileExt" type="string" default="">
-
- <cfif arguments.type eq 'File'>
- <cfreturn lcase(arguments.fileExt)>
- <cfelse>
- <cfreturn arguments.type>
- </cfif>
-
- </cffunction>
-
- <cffunction name="dspPortalNav" output="false" returntype="string">
- <cfargument name="class" default="navSecondary" required="true">
- <cfset var thenav="" />
- <cfset var menutype="" />
-
- <cfif event.getValue('contentBean').getType() eq 'Portal' or event.getValue('contentBean').getType() eq 'Gallery'>
- <cfif arraylen(this.crumbdata) gt (this.navParentIdx+this.navOffSet)>
- <cfif arraylen(this.crumbdata) gt (this.navGrandParentIdx+this.navOffSet) and (this.crumbdata[this.navGrandParentIdx].type neq 'Portal' or this.crumbdata[this.navGrandParentIdx].type neq 'Gallery') and not application.contentGateway.getCount(event.getValue('siteID'),this.crumbdata[this.navSelfIdx].contentID)>
- <cfset theNav = dspNestedNav(this.crumbdata[this.navGrandParentIdx].contentid,2,1,'default',now(),arguments.class,'',this.crumbdata[this.navGrandParentIdx].sortBy,this.crumbdata[this.navGrandParentIdx].sortDirection,application.configBean.getContext(),application.configBean.getStub(),event.getValue('categoryID')) />
- <cfelse>
- <cfset thenav=dspPeerNav(arguments.class) />
- </cfif>
- </cfif>
- <cfelseif arrayLen(this.crumbdata) gt (this.navSelfIdx+this.navOffSet) and this.crumbdata[this.navParentIdx].type eq 'Portal' or (arraylen(this.crumbdata) gt (this.navGrandParentIdx+this.navOffSet) and this.crumbdata[this.navGrandParentIdx].type eq 'Portal')>
- <cfif arraylen(this.crumbdata) gt (this.navGrandParentIdx+this.navOffSet) and this.crumbdata[this.navGrandParentIdx].type neq 'Portal' and not application.contentGateway.getCount(event.getValue('siteID'),this.crumbdata[this.navSelfIdx].contentID)>
- <cfset theNav = dspNestedNav(this.crumbdata[this.navGrandParentIdx].contentid,1,1,'default',now(),arguments.class,'',this.crumbdata[this.navGrandParentIdx].sortBy,this.crumbdata[this.navGrandParentIdx].sortDirection,application.configBean.getContext(),application.configBean.getStub(),event.getValue('categoryID')) />
- <cfelse>
- <cfset thenav=dspSubNav(arguments.class) />
- </cfif>
- <cfelse>
- <cfset thenav=dspStandardNav(arguments.class) />
- </cfif>
-
- <cfreturn thenav />
- </cffunction>
-
- <cffunction name="dspStandardNav" output="false" returntype="string">
- <cfargument name="class" default="navSecondary" required="true">
- <cfset var thenav="" />
- <cfset var menutype="" />
-
- <cfif event.getValue('contentBean').getType() neq 'Gallery'>
- <cfif arraylen(this.crumbdata) gt (this.navParentIdx+this.navOffSet)>
- <cfif this.crumbdata[this.navParentIdx].type eq 'calendar'>
- <cfset menutype='fixed'>
- <cfelse>
- <cfset menutype='default'>
- </cfif>
- <cfif arraylen(this.crumbdata) gt (this.navGrandParentIdx+this.navOffSet) and not application.contentGateway.getCount(event.getValue('siteID'),this.crumbdata[this.navSelfIdx].contentID)>
- <cfset theNav = dspNestedNav(this.crumbdata[this.navGrandParentIdx].contentid,2,1,menutype,now(),arguments.class,'',this.crumbdata[this.navGrandParentIdx].sortBy,this.crumbdata[this.navGrandParentIdx].sortDirection,application.configBean.getContext(),application.configBean.getStub()) />
- <cfelse>
- <cfset theNav = dspNestedNav(this.crumbdata[this.navParentIdx].contentid,2,1,menutype,now(),arguments.class,'',this.crumbdata[this.navParentIdx].sortBy,this.crumbdata[this.navParentIdx].sortDirection,application.configBean.getContext(),application.configBean.getStub()) />
- </cfif>
- <cfelse>
- <cfset theNav=dspSubNav(arguments.class) />
- </cfif>
-
- <cfreturn thenav />
- <cfelse>
- <cfreturn dspPortalNav(arguments.class) />
- </cfif>
- </cffunction>
-
- <cffunction name="dspSubNav" output="false" returntype="string">
- <cfargument name="class" default="navSecondary" required="true">
- <cfset var thenav="" />
- <cfset var menutype="">
- <cfif arraylen(this.crumbdata) gt (this.navSelfIdx+this.navOffSet)>
- <cfif this.crumbdata[this.navSelfIdx].type eq 'Calendar'><cfset menutype='fixed'><cfelse><cfset menutype='default'></cfif>
- <cfset theNav = dspNestedNav(this.crumbdata[this.navSelfIdx].contentID,1,1,menutype,now(),arguments.class,'',this.crumbdata[this.navSelfIdx].sortBy,this.crumbdata[this.navSelfIdx].sortDirection,application.configBean.getContext(),application.configBean.getStub()) />
- </cfif>
-
- <cfreturn thenav />
- </cffunction>
-
- <cffunction name="dspPeerNav" output="false" returntype="string">
- <cfargument name="class" default="navSecondary" required="true">
- <cfset var thenav="" />
- <cfset var menutype = "" />
-
- <cfif event.getContentBean().getContentID() neq '00000000000000000000000000000000001'
- and arraylen(this.crumbdata) gt (this.navParentIdx+this.navOffSet)>
- <cfif this.crumbdata[this.navParentIdx].type eq 'calendar'>
- <cfset menutype='fixed'>
- <cfelse>
- <cfset menutype='default'>
- </cfif>
- <cfset theNav = dspNestedNav(this.crumbdata[this.navParentIdx].contentID,1,1,menutype,now(),arguments.class,'',this.crumbdata[this.navParentIdx].sortBy,this.crumbdata[this.navParentIdx].sortDirection,application.configBean.getContext(),application.configBean.getStub()) />
- </cfif>
-
- <cfreturn theNav />
- </cffunction>
-
- <cffunction name="dspSequentialNav" output="false" returntype="string">
- <cfset var rsSection=application.contentGateway.getKids('00000000000000000000000000000000000','#event.getValue('siteID')#','#event.getValue('contentBean').getparentid()#','default',now(),0,'',0,'#this.crumbdata[2].sortBy#','#this.crumbdata[2].sortDirection#')>
- <cfset var link=''>
- <cfset var class=''>
- <cfset var itemClass=''>
- <cfset var theNav="">
- <cfset var current=1>
- <cfset var next=1>
- <cfset var prev=1>
-
- <cfif rsSection.recordcount and ((event.getValue('r').restrict and event.getValue('r').allow) or (not event.getValue('r').restrict))>
- <cfloop query="rsSection">
- <cfif rssection.filename eq event.getValue('contentBean').getfilename()>
- <cfset prev=iif((rsSection.currentrow - 1) lt 1,de(rsSection.recordcount),de(rsSection.currentrow-1)) />
- <cfset current=rsSection.currentrow />
- <cfset next=iif((rsSection.currentrow + 1) gt rsSection.recordcount,de(1),de(rsSection.currentrow + 1)) />
- </cfif>
- </cfloop>
-
- <cfsavecontent variable="theNav">
- <cfoutput>
- <ul class="navSequential">
- <cfif rsSection.contentID[1] neq event.getValue('contentBean').getContentID()>
- <li><a href="./?linkServID=#rsSection.contentID[prev]#">« #getSite().getRBFactory().getKey("sitemanager.prev")#</a></li>
- </cfif>
- <cfloop query="rsSection">
- <cfsilent>
- <cfset itemClass=iif(event.getValue('contentBean').getfilename() eq rsSection.filename,de('current'),de('')) />
- <cfset link=addlink(rsSection.type,rsSection.filename,rssection.currentrow,'','',rsSection.contentid,event.getValue('siteID'),'',application.configBean.getContext(),application.configBean.getStub(),application.configBean.getIndexFile(),showItemMeta(rsSection.fileExt))>
- </cfsilent>
- <li class="#itemClass#">#link#</li>
- </cfloop>
- <cfif rsSection.contentID[rsSection.recordcount] neq event.getValue('contentBean').getContentID()>
- <li><a href="./?linkServID=#rsSection.contentID[next]#">#getSite().getRBFactory().getKey("sitemanager.next")# »</a></li>
- </cfif>
- </ul></cfoutput>
- </cfsavecontent>
- </cfif>
- <cfreturn trim(theNav) />
- </cffunction>
-
- <cffunction name="dspGalleryNav" output="false" returntype="string">
- <cfset var rsSection=application.contentGateway.getKids('00000000000000000000000000000000000',event.getValue('siteID'),event.getValue('contentBean').getcontentID(),'default',now(),0,'',0,event.getValue('contentBean').getsortBy(),event.getValue('contentBean').getsortDirection(),event.getValue('categoryID'),event.getValue('relatedID'))>
- <cfset var link=''>
- <cfset var class=''>
- <cfset var itemClass=''>
- <cfset var theNav="">
- <cfset var current=1>
- <cfset var next=1>
- <cfset var prev=1>
-
- <cfif rsSection.recordcount and ((event.getValue('r').restrict and event.getValue('r').allow) or (not event.getValue('r').restrict))>
-
- <cfloop query="rsSection">
- <cfif rssection.contentID eq event.getValue('galleryItemID')>
- <cfset prev=iif((rsSection.currentrow - 1) lt 1,de(rsSection.recordcount),de(rsSection.currentrow-1)) />
- <cfset current=rsSection.currentrow />
- <cfset next=iif((rsSection.currentrow + 1) gt rsSection.recordcount,de(1),de(rsSection.currentrow + 1)) />
- </cfif>
- </cfloop>
-
- <cfsavecontent variable="theNav">
- <cfoutput>
- <ul class="navSequential">
- <li class="first">
- <a href="#application.configBean.getIndexFile()#?startrow=#event.getValue('startRow')#&galleryItemID=#rsSection.contentid[prev]#&categoryID=#event.getValue('categoryID')#&relatedID=#event.getValue('relatedID')#">« Prev</a>
- </li>
- <cfloop query="rsSection">
- <cfsilent>
- <cfset itemClass=iif(event.getValue('galleryItemID') eq rsSection.contentID,de('current'),de('')) />
- <cfset link='<a href="#application.configBean.getIndexFile()#?startrow=#event.getValue('startRow')#&galleryItemID=#rsSection.contentID#&categoryID=#event.getValue('categoryID')#">#rsSection.currentRow#</a>'>
- </cfsilent>
- <li class="#itemClass#">#link#</li>
- </cfloop>
- <li class="last"> <a href="#application.configBean.getIndexFile()#?startrow=#event.getValue('startRow')#&galleryItemID=#rsSection.contentid[next]#&categoryID=#event.getValue('categoryID')#">Next »</a></li>
- </ul></cfoutput>
- </cfsavecontent>
- </cfif>
- <cfreturn trim(theNav) />
- </cffunction>
-
- <cffunction name="dspSessionNav" output="false" returntype="string">
- <cfargument name="id" type="string" default="">
- <cfset var returnUrl = "" />
- <cfset var thenav = "" />
-
- <cfif event.getValue('returnURL') neq "">
- <cfset returnUrl = event.getValue('returnURL')>
- <cfelse>
- <cfset returnURL = URLEncodedFormat('#application.contentRenderer.getCurrentURL()#')>
- </cfif>
-
- <cfsavecontent variable="theNav">
- <cfif getSite().getExtranet() eq 1 and session.mura.isLoggedIn>
- <cfoutput><ul id="#arguments.id#"><li><a href="#application.configBean.getIndexFile()#?doaction=logout&nocache=1">Log Out #HTMLEditFormat("#session.mura.fname# #session.mura.lname#")#</a></li><li><a href="#application.settingsManager.getSite(event.getValue('siteID')).getEditProfileURL()#&returnURL=#returnURL#&nocache=1">Edit Profile</a></li></ul></cfoutput>
- </cfif>
- </cfsavecontent>
-
- <cfreturn trim(thenav) />
- </cffunction>
-
- <cffunction name="dspTagCloud" access="public" output="false" returntype="string">
- <cfargument name="parentID" type="any" required="true" default="" />
- <cfargument name="categoryID" type="any" required="true" default="" />
- <cfargument name="rsContent" type="any" required="true" default="" />
- <cfset var theIncludePath = event.getSite().getIncludePath() />
- <cfset var fileDelim = application.configBean.getFileDelim() />
- <cfset var filePath = theIncludePath & fileDelim & "includes" & fileDelim />
- <cfset var theContent = "" />
- <cfset var theme =$.siteConfig("theme")>
- <cfset var expandedPath=expandPath(filePath)>
- <cfset var str="">
-
- <cfsavecontent variable="str">
- <cfif fileExists(expandedPath & "themes/" & theme & "/display_objects/nav/dsp_tag_cloud.cfm")>
- <cfinclude template="#filePath#themes/#theme#/display_objects/nav/dsp_tag_cloud.cfm" />
- <cfelseif fileExists(expandedPath & "display_objects/custom/nav/dsp_tag_cloud.cfm")>
- <cfinclude template="#filePath#display_objects/custom/nav/dsp_tag_cloud.cfm" />
- <cfelse>
- <cfinclude template="#filePath#display_objects/nav/dsp_tag_cloud.cfm" />
- </cfif>
- </cfsavecontent>
-
- <cfreturn str />
- </cffunction>
-
- <cffunction name="getURLStem" access="public" output="false" returntype="string">
- <cfargument name="siteID">
- <cfargument name="filename">
-
- <cfif len(arguments.filename)>
- <cfif left(arguments.filename,1) neq "/">
- <cfset arguments.filename= "/" & arguments.filename>
- </cfif>
- <cfif right(arguments.filename,1) neq "/">
- <cfset arguments.filename= arguments.filename & "/">
- </cfif>
- </cfif>
-
- <cfif not application.configBean.getSiteIDInURLS()>
- <cfif arguments.filename neq ''>
- <cfif application.configBean.getStub() eq ''>
- <cfif application.configBean.getIndexFileInURLS() and not request.muraExportHTML>
- <cfreturn "/index.cfm" & arguments.filename />
- <cfelse>
- <cfreturn arguments.filename />
- </cfif>
- <cfelse>
- <cfreturn application.configBean.getStub() & arguments.filename />
- </cfif>
- <cfelse>
- <cfreturn "/" />
- </cfif>
- <cfelse>
- <cfif arguments.filename neq ''>
- <cfif not len(application.configBean.getStub())>
- <cfif application.configBean.getIndexFileInURLS()>
- <cfreturn "/" & arguments.siteID & "/index.cfm" & arguments.filename />
- <cfelse>
- <cfreturn "/" & arguments.siteID & arguments.filename />
- </cfif>
- <cfelse>
- <cfreturn application.configBean.getStub() & "/" & arguments.siteID & arguments.filename />
- </cfif>
- <cfelse>
- <cfif not len(application.configBean.getStub())>
- <cfreturn "/" & arguments.siteID & "/" />
- <cfelse>
- <cfreturn application.configBean.getStub() & "/" & arguments.siteID & "/" />
- </cfif>
- </cfif>
- </cfif>
- </cffunction>
-
- <cffunction name="createHREF" returntype="string" output="false" access="public">
- <cfargument name="type" required="true" default="Page">
- <cfargument name="filename" required="true">
- <cfargument name="siteid" required="true" default="">
- <cfargument name="contentid" required="true" default="">
- <cfargument name="target" required="true" default="">
- <cfargument name="targetParams" required="true" default="">
- <cfargument name="querystring" required="true" default="">
- <cfargument name="context" type="string" required="true" default="#application.configBean.getContext()#">
- <cfargument name="stub" type="string" required="true" default="#application.configBean.getStub()#">
- <cfargument name="indexFile" type="string" required="true" default="">
- <cfargument name="complete" type="boolean" required="true" default="false">
- <cfargument name="showMeta" type="string" required="true" default="0">
-
- <cfset var href=""/>
- <cfset var tp=""/>
- <cfset var begin=iif(arguments.complete,de('http://#application.settingsManager.getSite(arguments.siteID).getDomain()##application.configBean.getServerPort()#'),de('')) />
- <cfset var fileBean="">
-
- <cfif len(arguments.querystring) and not left(arguments.querystring,1) eq "?">
- <cfset arguments.querystring="?" & arguments.querystring>
- </cfif>
-
- <cfswitch expression="#arguments.type#">
- <cfcase value="Link,File">
- <cfif not request.muraExportHTML>
- <cfset href=HTMLEditFormat("#begin##arguments.context##getURLStem(arguments.siteid,'linkservid/#arguments.contentid#/showMeta/#arguments.showMeta#')##arguments.querystring#")/>
- <cfelseif arguments.type eq "Link">
- <cfset href=arguments.filename>
- <cfelse>
- <cfset fileBean=$.getBean("content").loadBy(contentID=arguments.contentID)>
- <cfset href="#arguments.context#/#arguments.siteID#/cache/file/#fileBean.getFileID()#/#fileBean.getFilename()#">
- </cfif>
- </cfcase>
- <cfdefaultcase>
- <cfset href=HTMLEditFormat("#begin##arguments.context##getURLStem(arguments.siteid,'#arguments.filename#')##arguments.querystring#") />
- </cfdefaultcase>
- </cfswitch>
-
- <cfif arguments.target eq "_blank" and arguments.showMeta eq 0>
- <cfset tp=iif(arguments.targetParams neq "",de(",'#arguments.targetParams#'"),de("")) />
- <cfset href="javascript:newWin=window.open('#href#','NewWin#replace('#rand()#','.','')#'#tp#);newWin.focus();void(0);" />
- </cfif>
-
- <cfreturn href />
- </cffunction>
-
- <cffunction name="createHREFforRSS" returntype="string" output="false" access="public">
- <cfargument name="type" required="true" default="Page">
- <cfargument name="filename" required="true">
- <cfargument name="siteid" required="true">
- <cfargument name="contentid" required="true" default="">
- <cfargument name="target" required="true" default="">
- <cfargument name="targetParams" required="true" default="">
- <cfargument name="context" type="string" default="#application.configBean.getContext()#">
- <cfargument name="stub" type="string" default="#application.configBean.getStub()#">
- <cfargument name="indexFile" type="string" default="">
- <cfargument name="showMeta" type="string" default="0">
- <cfargument name="fileExt" type="string" default="" required="true">
-
- <cfset var href=""/>
- <cfset var tp=""/>
- <cfset var begin="http://#application.settingsManager.getSite(arguments.siteID).getDomain()##application.configBean.getServerPort()#" />
-
- <cfswitch expression="#arguments.type#">
- <cfcase value="Link">
- <cfset href="#begin##arguments.context##getURLStem(arguments.siteid,'')#?LinkServID=#arguments.contentid#&showMeta=#arguments.showMeta#"/>
- </cfcase>
- <cfcase value="File">
- <cfset href="#begin##arguments.context##getURLStem(arguments.siteid,'')#?LinkServID=#arguments.contentid#&showMeta=#arguments.showMeta#&fileExt=.#arguments.fileExt#"/>
- </cfcase>
- <cfdefaultcase>
- <cfset href="#begin##arguments.context##getURLStem(arguments.siteid,'#arguments.filename#')#" />
- </cfdefaultcase>
- </cfswitch>
-
-
- <cfreturn href />
- </cffunction>
-
- <cffunction name="createHREFForImage" output="false" returntype="any">
- <cfargument name="siteID">
- <cfargument name="fileID">
- <cfargument name="fileExt">
- <cfargument name="size" required="true" default="large">
- <cfargument name="direct" required="true" default="#this.directImages#">
- <cfargument name="complete" type="boolean" required="true" default="false">
- <cfargument name="height" default=""/>
- <cfargument name="width" default=""/>
-
- <cfset var imgSuffix=arguments.size>
- <cfset var returnURL="">
- <cfset var begin="">
-
- <cfif not structKeyExists(arguments,"fileEXT")>
- <cfset arguments.fileEXT=getBean("fileManager").readMeta(arguments.fileID).fileEXT>
- </cfif>
-
- <cfif not structKeyExists(arguments,"siteID")>
- <cfset arguments.siteID=session.siteID>
- </cfif>
-
- <cfset begin=iif(arguments.complete,de('http://#application.settingsManager.getSite(arguments.siteID).getDomain()##application.configBean.getServerPort()#'),de('')) />
-
- <cfif request.muraExportHtml>
- <cfset arguments.direct=true>
- </cfif>
-
- <cfif arguments.direct and application.configBean.getFileStore() eq "fileDir">
- <cfif not len(arguments.width) and not len(arguments.height)>
- <cfif imgSuffix eq "large">
- <cfset imgSuffix="">
- <cfelse>
- <cfset imgSuffix="_" & imgSuffix>
- </cfif>
- <cfset returnURL=application.configBean.getAssetPath() & "/" & arguments.siteID & "/cache/file/" & arguments.fileID & imgSuffix & "." & arguments.fileEXT>
- <cfelse>
- <cfif not len(arguments.width)>
- <cfset arguments.width="auto">
- </cfif>
- <cfif not len(arguments.height)>
- <cfset arguments.height="auto">
- </cfif>
- <cfreturn application.configBean.getAssetPath() & "/" & arguments.siteID & "/cache/file/" & getBean("filemanager").getCustomImage("#application.configBean.getFileDir()##application.configBean.getFileDelim()##arguments.siteid##application.configBean.getFileDelim()#cache#application.configBean.getFileDelim()#file#application.configBean.getFileDelim()##arguments.fileID#.#arguments.fileExt#",arguments.height,arguments.width)>
- </cfif>
- <cfelse>
- <cfif imgSuffix eq "large">
- <cfset imgSuffix="file">
- </cfif>
- <cfset returnURL=application.configBean.getContext() & "/tasks/render/" & imgSuffix & "/?fileID=" & arguments.fileID & "&fileEXT=" & arguments.fileEXT>
- </cfif>
-
- <cfreturn begin & returnURL>
-
- </cffunction>
-
- <cffunction name="addlink" output="false" returntype="string">
- <cfargument name="type" required="true">
- <cfargument name="filename" required="true">
- <cfargument name="title" required="true">
- <cfargument name="target" type="string" default="">
- <cfargument name="targetParams" type="string" default="">
- <cfargument name="contentid" required="true">
- <cfargument name="siteid" required="true">
- <cfargument name="querystring" type="string" required="true" default="">
- <cfargument name="context" type="string" required="true" default="#application.configBean.getContext()#">
- <cfargument name="stub" type="string" required="true" default="#application.configBean.getStub()#">
- <cfargument name="indexFile" type="string" required="true" default="">
- <cfargument name="showMeta" type="string" required="true" default="0">
- <cfargument name="showCurrent" type="string" required="true" default="1">
- <cfargument name="class" type="string" required="true" default="">
- <cfargument name="complete" type="boolean" required="true" default="false">
- <cfargument name="id" type="string" required="true" default="">
-
-
- <cfset var link ="">
- <cfset var href ="">
- <cfset var theClass =arguments.class>
-
- <cfif arguments.showCurrent and listFind(event.getValue('contentBean').getPath(),"#arguments.contentID#")>
- <cfset theClass=listAppend(theClass,"current"," ") />
- </cfif>
-
- <cfset href=createHREF(arguments.type,arguments.filename,arguments.siteid,arguments.contentid,arguments.target,iif(arguments.filename eq event.getValue('contentBean').getfilename(),de(''),de(arguments.targetParams)),arguments.queryString,arguments.context,arguments.stub,arguments.indexFile,arguments.complete,arguments.showMeta)>
- <cfset link='<a href="#href#"#iif(len(theClass),de(' class="#theClass#"'),de(""))##iif(len(arguments.id),de(' id="#arguments.id#"'),de(""))#>#HTMLEditFormat(arguments.title)#</a>' />
-
- <cfreturn link>
- </cffunction>
-
- <cffunction name="dspObject_Render" access="public" output="false" returntype="string">
- <cfargument name="siteid" type="string" />
- <cfargument name="object" type="string" />
- <cfargument name="objectid" type="string" />
- <cfargument name="fileName" type="string" />
- <cfargument name="cacheKey" type="string" required="false" />
- <cfargument name="hasSummary" type="boolean" required="false" default="true" />
- <cfargument name="useRss" type="boolean" required="false" default="false" />
-
- <cfset var theContent=""/>
- <cfset var objectPerm="none">
-
- <cfif session.mura.isLoggedIn and this.showEditableObjects>
- <cfset objectPerm=application.permUtility.getDisplayObjectPerm(arguments.siteID,arguments.object,arguments.objectID)>
- </cfif>
-
- <cfif StructKeyExists(arguments,"cacheKey") and objectPerm neq "editor">
- <cfsavecontent variable="theContent">
- <cf_CacheOMatic key="#arguments.cacheKey#" nocache="#event.getValue('nocache')#">
- <cfoutput>#dspObject_Include(arguments.siteid,arguments.object,arguments.objectid,arguments.fileName,arguments.hasSummary,arguments.useRss)#</cfoutput>
- </cf_cacheomatic>
- </cfsavecontent>
- <cfelse>
- <cfset theContent = dspObject_Include(arguments.siteid,arguments.object,arguments.objectid,arguments.fileName,arguments.hasSummary,arguments.useRss,objectPerm) />
- </cfif>
- <cfreturn theContent />
-
- </cffunction>
-
- <cffunction name="dspObject_Include" access="public" output="false" returntype="string">
- <cfargument name="siteid" type="string" />
- <cfargument name="object" type="string" />
- <cfargument name="objectid" type="string" />
- <cfargument name="theFile" type="string" />
- <cfargument name="hasSummary" type="boolean" required="true" default="false"/>
- <cfargument name="RSS" type="boolean" required="true" default="false" />
- <cfargument name="objectPerm" type="string" required="true" default="none" />
-
- <cfset var fileDelim = application.configBean.getFileDelim() />
- <cfset var displayObjectPath = $.siteConfig('IncludePath') & fileDelim & "includes" & fileDelim & "display_objects"/>
- <cfset var themeObjectPath = $.siteConfig('ThemeIncludePath') & fileDelim & "display_objects"/>
- <cfset var themePath = $.siteConfig('themeAssetPath') />
- <cfset var useRss = arguments.RSS />
- <cfset var bean = "" />
- <cfset var theContent = "" />
- <cfset var editableControl = structNew()>
- <cfset var expandedDisplayObjectPath=expandPath(displayObjectPath)>
- <cfset var expandedThemeObjectPath=expandPath(themeObjectPath)>
-
- <cfsavecontent variable="theContent">
- <cfif fileExists(expandedThemeObjectPath & fileDelim & arguments.theFile)>
- <cfinclude template="#themeObjectPath#/#arguments.theFile#" />
- <cfelseif fileExists(expandedDisplayObjectPath & fileDelim & "custom" & fileDelim & arguments.theFile)>
- <cfinclude template="#displayObjectPath#/custom/#arguments.theFile#" />
- <cfelse>
- <cfinclude template="#displayObjectPath#/#arguments.theFile#" />
- </cfif>
- </cfsavecontent>
- <cfreturn theContent />
-
- </cffunction>
-
- <cffunction name="dspObject" access="public" output="false" returntype="string">
- <cfargument name="object" type="string">
- <cfargument name="objectid" type="string" required="true" default="">
- <cfargument name="siteid" type="string" required="true" default="#event.getValue('siteID')#">
- <cfargument name="params" type="string" required="true" default="">
- <cfset var theObject = "" />
- <cfset var cacheKeyContentId = arguments.object & event.getValue('contentBean').getcontentID() />
- <cfset var cacheKeyObjectId = arguments.object & arguments.objectid />
-
- <cfsavecontent variable="theObject">
- <cfoutput>
- <cfswitch expression="#arguments.object#">
- <cfcase value="sub_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_sub.cfm",cacheKeyContentId)#</cfcase>
- <cfcase value="peer_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_peer.cfm",cacheKeyContentId)#</cfcase>
- <cfcase value="standard_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_standard.cfm",cacheKeyContentId)#</cfcase>
- <cfcase value="portal_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_portal.cfm",cacheKeyContentId)#</cfcase>
- <cfcase value="multilevel_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_multilevel.cfm",cacheKeyContentId)#</cfcase>
- <cfcase value="seq_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_sequential.cfm","#arguments.object##arguments.objectid##event.getValue('startRow')#")#</cfcase>
- <cfcase value="top_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_top.cfm",cacheKeyContentId)#</cfcase>
- <cfcase value="contact">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_contact.cfm")#</cfcase>
- <cfcase value="calendar_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/calendarNav/index.cfm")#</cfcase>
- <cfcase value="plugin">#application.pluginManager.displayObject(object=arguments.objectid,event=event,params=arguments.params)#</cfcase>
- <cfcase value="mailing_list">#dspObject_Render(siteid=arguments.siteid,object=arguments.object,objectid=arguments.objectid,fileName="dsp_mailing_list.cfm")#</cfcase>
- <cfcase value="mailing_list_master">#dspObject_Render(siteid=arguments.siteid,object=arguments.object,objectid=arguments.objectid,fileName="dsp_mailing_list_master.cfm")#</cfcase>
- <cfcase value="site_map">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_site_map.cfm",cacheKeyObjectId)#</cfcase>
- <cfcase value="features">
- <cfset addToHTMLHeadQueue("listImageStyles.cfm")>
- #dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_features.cfm",cacheKeyObjectId)#
- </cfcase>
- <cfcase value="features_no_summary">
- <cfset addToHTMLHeadQueue("listImageStyles.cfm")>
- #dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_features.cfm",cacheKeyObjectId,false)#
- </cfcase>
- <cfcase value="category_features">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_category_features.cfm",cacheKeyObjectId)#</cfcase>
- <cfcase value="category_features_no_summary">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_category_features.cfm",cacheKeyObjectId,false)#</cfcase>
- <cfcase value="category_portal_features">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_category_portal_features.cfm",cacheKeyObjectId)#</cfcase>
- <cfcase value="category_portal_fea