PageRenderTime 101ms CodeModel.GetById 27ms RepoModel.GetById 2ms app.codeStats 0ms

/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
  1. <!--- This file is part of Mura CMS.
  2. Mura CMS is free software: you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation, Version 2 of the License.
  5. Mura CMS is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with Mura CMS. If not, see <http://www.gnu.org/licenses/>.
  11. Linking Mura CMS statically or dynamically with other modules constitutes
  12. the preparation of a derivative work based on Mura CMS. Thus, the terms and
  13. conditions of the GNU General Public License version 2 (GPL) cover the entire combined work.
  14. However, as a special exception, the copyright holders of Mura CMS grant you permission
  15. to combine Mura CMS with programs or libraries that are released under the GNU Lesser General Public License version 2.1.
  16. In addition, as a special exception, the copyright holders of Mura CMS grant you permission
  17. to combine Mura CMS with independent software modules that communicate with Mura CMS solely
  18. through modules packaged as Mura CMS plugins and deployed through the Mura CMS plugin installation API,
  19. provided that these modules (a) may only modify the /trunk/www/plugins/ directory through the Mura CMS
  20. plugin installation API, (b) must not alter any default objects in the Mura CMS database
  21. and (c) must not alter any files in the following directories except in cases where the code contains
  22. a separately distributed license.
  23. /trunk/www/admin/
  24. /trunk/www/tasks/
  25. /trunk/www/config/
  26. /trunk/www/requirements/mura/
  27. You may copy and distribute such a combined work under the terms of GPL for Mura CMS, provided that you include
  28. the source code of that other code when and as the GNU GPL requires distribution of source code.
  29. For clarity, if you create a modified version of Mura CMS, you are not obligated to grant this special exception
  30. for your modified version; it is your choice whether to do so, or to make such modified version available under
  31. the GNU General Public License version 2 without this exception. You may, if you choose, apply this exception
  32. to your own modified versions of Mura CMS.
  33. --->
  34. <cfcomponent extends="mura.cfobject" output="false">
  35. <cfset this.navOffSet=0/>
  36. <cfset this.navDepthLimit=1000/>
  37. <cfset this.navParentIdx=2/>
  38. <cfset this.navGrandParentIdx=3/>
  39. <cfset this.navDepthAdjust=0/>
  40. <cfset this.navSelfIdx=1/>
  41. <cfset this.jslib="prototype"/>
  42. <cfset this.jsLibLoaded=false/>
  43. <cfset this.longDateFormat="long"/>
  44. <cfset this.shortDateFormat="short"/>
  45. <cfset this.showMetaList="jpg,jpeg,png,gif">
  46. <cfset this.imageInList="jpg,jpeg,png,gif">
  47. <cfset this.directImages=true/>
  48. <cfset this.personalization="user">
  49. <cfset this.showAdminToolBar=true/>
  50. <cfset this.showMemberToolBar=true/>
  51. <cfset this.showEditableObjects=true/>
  52. <!--- renderHTMLHead has been deprecated in favor of renderHTMLQueues---->
  53. <cfset this.renderHTMLHead=true/>
  54. <cfset this.renderHTMLQueues=true/>
  55. <cfset this.enableMuraTag=getConfigBean().getEnableMuraTag() />
  56. <cfset this.crumbdata=arrayNew(1)/>
  57. <cfset this.listFormat="dl">
  58. <cfset this.headline="h2"/>
  59. <cfset this.subHead1="h3"/>
  60. <cfset this.subHead2="h4"/>
  61. <cfset this.subHead3="h5"/>
  62. <cfset this.subHead4="h6">
  63. <cffunction name="init" returntype="any" access="public" output="false">
  64. <cfargument name="event" required="true" default="">
  65. <cfif isObject(arguments.event)>
  66. <cfset variables.event=arguments.event>
  67. <cfelse>
  68. <cfset variables.event=createObject("component","mura.servletEvent")>
  69. </cfif>
  70. <cfset variables.$=variables.event.getValue("muraScope")>
  71. <cfset variables.mura=$>
  72. <cfif request.muraExportHtml>
  73. <cfset this.showEditableObjects=false>
  74. <cfset this.showAdminToolBar=false>
  75. <cfset this.showMemberToolBar=false>
  76. </cfif>
  77. <cfreturn this />
  78. </cffunction>
  79. <cffunction name="getHeaderTag" returntype="string" output="false">
  80. <cfargument name="header">
  81. <cfif listFindNoCase("headline,subHead1,subHead2,subHead3,subHead4",arguments.header)>
  82. <cfreturn this["#arguments.header#"]/>
  83. <cfelse>
  84. <cfreturn "Invalid Argument. Must be one of 'headline, subHead1, subHead2, subHead3, subHead4'">
  85. </cfif>
  86. </cffunction>
  87. <cffunction name="setJsLib" returntype="void" output="false">
  88. <cfargument name="jsLib">
  89. <cfset this.jsLib=arguments.jsLib />
  90. </cffunction>
  91. <cffunction name="getJsLib" returntype="string" output="false">
  92. <cfreturn this.jsLib />
  93. </cffunction>
  94. <cffunction name="setRenderHTMLQueues" returntype="void" output="false">
  95. <cfargument name="renderHTMLQueues">
  96. <cfset this.renderHTMLQueues=arguments.renderHTMLQueues />
  97. </cffunction>
  98. <cffunction name="getRenderHTMLQueues" returntype="string" output="false">
  99. <cfreturn this.renderHTMLQueues and this.renderHTMLHead />
  100. </cffunction>
  101. <cffunction name="setRenderHTMLHead" returntype="void" output="false" hint="This is deprecated.">
  102. <cfargument name="renderHTMLHead">
  103. <cfset this.renderHTMLQueues=arguments.renderHTMLHead />
  104. </cffunction>
  105. <cffunction name="getRenderHTMLHead" returntype="string" output="false" hint="This is deprecated.">
  106. <cfreturn this.renderHTMLQueues />
  107. </cffunction>
  108. <cffunction name="setShowAdminToolBar" returntype="void" output="false">
  109. <cfargument name="showAdminToolBar">
  110. <cfset this.showAdminToolBar=arguments.showAdminToolBar />
  111. </cffunction>
  112. <cffunction name="getShowAdminToolBar" returntype="string" output="false">
  113. <cfreturn this.showAdminToolBar />
  114. </cffunction>
  115. <cffunction name="getPersonalization" returntype="string" output="false">
  116. <cfreturn this.personalization />
  117. </cffunction>
  118. <cffunction name="getPersonalizationID" returntype="string" output="false">
  119. <cfif getPersonalization() eq "user">
  120. <cfreturn session.mura.userID />
  121. <cfelse>
  122. <cfif not structKeyExists(cookie,"pid")>
  123. <cfcookie name="pid" expires="never" value="#application.utility.getUUID()#">
  124. </cfif>
  125. <cfreturn cookie.pid />
  126. </cfif>
  127. </cffunction>
  128. <cffunction name="getListFormat" returntype="string" output="false">
  129. <cfreturn this.listFormat />
  130. </cffunction>
  131. <cffunction name="setListFormat" returntype="string" output="false">
  132. <cfargument name="listFormat">
  133. <cfset this.listFormat=arguments.listFormat>
  134. <cfreturn this/>
  135. </cffunction>
  136. <cffunction name="loadJSLib" returntype="void" output="false">
  137. <cfif not this.jsLibLoaded>
  138. <cfswitch expression="#getJsLib()#">
  139. <cfcase value="jquery">
  140. <cfset addToHTMLHeadQueue("jquery.cfm")>
  141. </cfcase>
  142. <cfdefaultcase>
  143. <cfset addToHTMLHeadQueue("prototype.cfm")>
  144. <cfset addToHTMLHeadQueue("scriptaculous.cfm")>
  145. </cfdefaultcase>
  146. </cfswitch>
  147. </cfif>
  148. </cffunction>
  149. <cffunction name="loadShadowboxJS" returntype="void" output="false">
  150. <cfif not cookie.mobileFormat>
  151. <cfset loadJSLib() />
  152. <cfswitch expression="#getJsLib()#">
  153. <cfcase value="jquery">
  154. <cfset addToHTMLHeadQueue("shadowbox-jquery.cfm")>
  155. </cfcase>
  156. <cfdefaultcase>
  157. <cfset addToHTMLHeadQueue("shadowbox-prototype.cfm")>
  158. </cfdefaultcase>
  159. </cfswitch>
  160. <cfset addToHTMLHeadQueue("shadowbox.cfm")>
  161. </cfif>
  162. </cffunction>
  163. <cffunction name="setLongDateFormat" returntype="void" output="false">
  164. <cfargument name="longDateFormat">
  165. <cfset this.longDateFormat=arguments.longDateFormat />
  166. </cffunction>
  167. <cffunction name="getLongDateFormat" returntype="string" output="false">
  168. <cfreturn this.longDateFormat />
  169. </cffunction>
  170. <cffunction name="setShortDateFormat" returntype="void" output="false">
  171. <cfargument name="shortDateFormat">
  172. <cfset this.shortDateFormat=arguments.shortDateFormat />
  173. </cffunction>
  174. <cffunction name="getShortDateFormat" returntype="string" output="false">
  175. <cfreturn this.shortDateFormat />
  176. </cffunction>
  177. <cffunction name="setNavOffSet" returntype="void" output="false">
  178. <cfargument name="navOffSet">
  179. <cfif not event.getValue('contentBean').getIsNew()>
  180. <cfset this.navOffSet=arguments.navOffSet />
  181. </cfif>
  182. </cffunction>
  183. <cffunction name="setNavDepthLimit" returntype="void" output="false">
  184. <cfargument name="navDepthLimit">
  185. <cfset this.navDepthLimit=arguments.navDepthLimit />
  186. <cfif arrayLen(this.crumbdata) gt this.navDepthLimit >
  187. <cfset this.navDepthAdjust=arraylen(this.crumbdata)-this.navDepthLimit />
  188. <cfset this.navGrandParentIdx= 3 + this.navDepthAdjust />
  189. <cfset this.navParentIdx=2 + this.navDepthAdjust />
  190. <cfset this.navSelfIdx= 1 + this.navDepthAdjust />
  191. </cfif>
  192. </cffunction>
  193. <cffunction name="showItemMeta" returntype="any" output="false">
  194. <cfargument name="fileExt">
  195. <cfif listFind(this.showMetaList,lcase(arguments.fileExt))>
  196. <cfreturn 1>
  197. <cfelse>
  198. <cfreturn event.getValue('showMeta')>
  199. </cfif>
  200. </cffunction>
  201. <cffunction name="showImageInList" returntype="any" output="false">
  202. <cfargument name="fileExt">
  203. <cfreturn listFind(this.imageInList,lcase(arguments.fileExt))>
  204. </cffunction>
  205. <cffunction name="allowLink" output="false" returntype="boolean">
  206. <cfargument name="restrict" type="numeric" default=0>
  207. <cfargument name="restrictgroups" type="string" default="" />
  208. <cfargument name="loggedIn" type="numeric" default=0 />
  209. <cfargument name="rspage" type="query" />
  210. <cfset var allowLink=true>
  211. <cfset var G = 0 />
  212. <cfif arguments.loggedIn and (arguments.restrict)>
  213. <cfif arguments.restrictgroups eq '' or listFind(session.mura.memberships,'S2IsPrivate;#application.settingsManager.getSite(event.getValue('siteID')).getPrivateUserPoolID()#') or listFind(session.mura.memberships,'S2')>
  214. <cfset allowLink=True>
  215. <cfelseif arguments.restrictgroups neq ''>
  216. <cfset allowLink=False>
  217. <cfloop list="#arguments.restrictgroups#" index="G">
  218. <cfif listFind(session.mura.memberships,'#G#;#application.settingsManager.getSite(event.getValue('siteID')).getPublicUserPoolID()#;1')>
  219. <cfset allowLink=true>
  220. </cfif>
  221. </cfloop>
  222. </cfif>
  223. </cfif>
  224. <cfreturn allowLink>
  225. </cffunction>
  226. <cffunction name="getTopId" output="false" returntype="string">
  227. <cfargument name="useNavOffset" required="true" default="false"/>
  228. <cfset var id="homepage">
  229. <cfset var topId="">
  230. <cfset var offset=1>
  231. <cfif arguments.useNavOffset>
  232. <cfset offset=1+this.navOffset/>
  233. </cfif>
  234. <cfif arrayLen(this.crumbdata) gt offset>
  235. <cfset topID = replace(getCrumbVarByLevel("filename",offset),"_"," ","ALL")>
  236. <cfset topID = setCamelback(topID)>
  237. <cfset id = Left(LCase(topID), 1)>
  238. <cfif len(topID) gt 1>
  239. <cfset id=id & Right(topID, Len(topID)-1)>
  240. </cfif>
  241. </cfif>
  242. <cfif event.getValue('contentBean').getIsNew() eq 1>
  243. <cfset id = "fourzerofour">
  244. </cfif>
  245. <cfreturn id>
  246. </cffunction>
  247. <cffunction name="getTopVar" output="true" returntype="string">
  248. <cfargument name="topVar" required="true" default="" type="String">
  249. <cfargument name="useNavOffset" required="true" type="boolean" default="false">
  250. <cfset var theVar="">
  251. <cfset var offset=1>
  252. <cfif arguments.useNavOffset>
  253. <cfset offset=offset+this.navOffset/>
  254. </cfif>
  255. <cfreturn getCrumbVarByLevel(arguments.topVar,offset)>
  256. </cffunction>
  257. <cffunction name="getCrumbVarByLevel" output="false" returntype="string">
  258. <cfargument name="theVar" required="true" default="" type="String">
  259. <cfargument name="level" required="true" type="numeric" default="1">
  260. <cfif arrayLen(this.crumbData) gt arguments.level>
  261. <cfreturn this.crumbData[arrayLen(this.crumbData)-arguments.level][arguments.theVar]>
  262. <cfelse>
  263. <cfreturn "">
  264. </cfif>
  265. </cffunction>
  266. <cffunction name="dspZoom" returntype="string" output="false">
  267. <cfargument name="crumbdata" required="yes" type="array">
  268. <cfargument name="fileExt" type="string" default="">
  269. <cfargument name="ajax" type="boolean" default="false">
  270. <cfset var content = "">
  271. <cfset var locked = "">
  272. <cfset var lastlocked = "">
  273. <cfset var crumbLen=arrayLen(arguments.crumbdata)>
  274. <cfset var I = 0 />
  275. <cfset var anchorString="">
  276. <cfsavecontent variable="content">
  277. <cfoutput>
  278. <ul class="navZoom">
  279. <cfloop from="#crumbLen#" to="2" index="I" step="-1">
  280. <cfsilent>
  281. <cfif arguments.crumbdata[i].restricted eq 1><cfset locked="Locked"></cfif>
  282. </cfsilent>
  283. <li class="#renderIcon(arguments.crumbdata[i].type,arguments.fileExt)##locked#">
  284. <a <cfif arguments.ajax>
  285. href="" onclick="return loadSiteManager('#arguments.crumbdata[I].siteid#','#arguments.crumbdata[I].contentid#','00000000000000000000000000000000000','','','#arguments.crumbdata[I].type#',1);"
  286. <cfelse>
  287. href="#application.configBean.getContext()#/admin/index.cfm?fuseaction=cArch.list&siteid=#arguments.crumbdata[I].siteid#&topid=#arguments.crumbdata[I].contentid#&moduleid=00000000000000000000000000000000000"
  288. </cfif>>#HTMLEditformat(arguments.crumbdata[I].menutitle)#</a> &raquo;</li>
  289. </cfloop>
  290. <cfsilent>
  291. <cfif locked eq "Locked" or arguments.crumbdata[1].restricted eq 1>
  292. <cfset lastlocked="Locked">
  293. </cfif>
  294. </cfsilent>
  295. <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'>
  296. <a <cfif arguments.ajax>
  297. href="" onclick="return loadSiteManager('#arguments.crumbdata[1].siteid#','#arguments.crumbdata[1].contentid#','00000000000000000000000000000000000','','','#arguments.crumbdata[1].type#',1);"
  298. <cfelse>
  299. href="#application.configBean.getContext()#/admin/index.cfm?fuseaction=cArch.list&siteid=#arguments.crumbdata[1].siteid#&topid=#arguments.crumbdata[1].contentid#&moduleid=00000000000000000000000000000000000"
  300. </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>
  301. </cfoutput>
  302. </cfsavecontent>
  303. <cfreturn content />
  304. </cffunction>
  305. <cffunction name="dspZoomNoLinks" returntype="string" output="false">
  306. <cfargument name="crumbdata" required="yes" type="array">
  307. <cfargument name="fileExt" type="string" default="">
  308. <cfset var content = "">
  309. <cfset var locked = "">
  310. <cfset var lastlocked = "">
  311. <cfset var crumbLen=arrayLen(arguments.crumbdata)>
  312. <cfset var I = 0 />
  313. <cfsavecontent variable="content">
  314. <cfoutput>
  315. <ul class="navZoom">
  316. <cfloop from="#crumbLen#" to="2" index="I" step="-1">
  317. <cfif arguments.crumbdata[i].restricted eq 1><cfset locked="Locked"></cfif>
  318. <li class="#renderIcon(arguments.crumbdata[i].type,arguments.fileExt)##locked#">#HTMLEditformat(arguments.crumbdata[I].menutitle)# &raquo;</li>
  319. </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>
  320. <cfreturn content />
  321. </cffunction>
  322. <cffunction name="dspNestedNav" output="false" returntype="string">
  323. <cfargument name="contentid" type="string" >
  324. <cfargument name="viewDepth" type="numeric" required="true" default="1">
  325. <cfargument name="currDepth" type="numeric" required="true" default="1">
  326. <cfargument name="type" type="string" default="default">
  327. <cfargument name="today" type="date" default="#now()#">
  328. <cfargument name="class" type="string" default="">
  329. <cfargument name="querystring" type="string" default="">
  330. <cfargument name="sortBy" type="string" default="orderno">
  331. <cfargument name="sortDirection" type="string" default="asc">
  332. <cfargument name="context" type="string" default="#application.configBean.getContext()#">
  333. <cfargument name="stub" type="string" default="#application.configBean.getStub()#">
  334. <cfargument name="categoryID" type="string" default="">
  335. <cfargument name="relatedID" type="string" default="">
  336. <cfargument name="rs" required="true" default="">
  337. <cfargument name="subNavExpression" required="true" default="">
  338. <cfset var rsSection=arguments.rs>
  339. <cfset var adjust=0>
  340. <cfset var current=0>
  341. <cfset var link=''>
  342. <cfset var itemClass=''>
  343. <cfset var isCurrent=false>
  344. <cfset var nest=''>
  345. <cfset var subnav=false>
  346. <cfset var theNav="">
  347. <cfif not isQuery(rsSection)>
  348. <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)>
  349. </cfif>
  350. <cfif rsSection.recordcount and ((event.getValue('r').restrict and event.getValue('r').allow) or (not event.getValue('r').restrict))>
  351. <cfset adjust=rsSection.recordcount>
  352. <cfsavecontent variable="theNav">
  353. <cfoutput>
  354. <ul #iif(arguments.class neq '',de(' class="#arguments.class #"'),de(''))#><cfloop query="rsSection"><cfif allowLink(rssection.restricted,rssection.restrictgroups,event.getValue('r').loggedIn)><cfsilent>
  355. <cfset current=current+1>
  356. <cfset nest=''>
  357. <cfif len(arguments.subNavExpression)>
  358. <cfset subnav=evaluate(arguments.subNavExpression)>
  359. <cfelse>
  360. <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) >
  361. </cfif>
  362. <cfif subnav>
  363. <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) />
  364. </cfif>
  365. <cfset itemClass=iif(current eq 1,de('first'),de(iif(current eq adjust,de('last'),de('')))) />
  366. <cfset isCurrent=listFind(event.getValue('contentBean').getPath(),"#rsSection.contentid#") />
  367. <cfif isCurrent>
  368. <cfset itemClass=listAppend(itemClass,"current"," ")>
  369. </cfif>
  370. <cfset link=addlink(rsSection.type,rsSection.filename,rsSection.menutitle,rsSection.target,rsSection.targetParams,rsSection.contentid,event.getValue('siteID'),arguments.querystring,arguments.context,arguments.stub)>
  371. </cfsilent>
  372. <li<cfif len(itemClass)> class="#itemClass#"</cfif>>#link#<cfif subnav and find("<li",nest)>#nest#</cfif></li><cfelse><cfset adjust=adjust-1></cfif></cfloop>
  373. </ul></cfoutput>
  374. </cfsavecontent>
  375. </cfif>
  376. <cfreturn theNav />
  377. </cffunction>
  378. <cffunction name="dspCrumblistLinks" output="false" returntype="string">
  379. <cfargument name="id" type="string" default="crumblist">
  380. <cfargument name="separator" type="string" default="">
  381. <cfset var thenav="" />
  382. <cfset var theOffset=arrayLen(this.crumbdata)- this.navOffSet />
  383. <cfset var I = 0 />
  384. <cfif arrayLen(this.crumbdata) gt (1 + this.navOffSet)>
  385. <cfsavecontent variable="theNav">
  386. <cfoutput><ul id="#arguments.id#">
  387. <cfloop from="#theOffset#" to="1" index="I" step="-1">
  388. <cfif I neq 1>
  389. <li class="#iif(I eq theOffset,de('first'),de(''))#">
  390. <cfif i neq theOffset>#arguments.separator#</cfif>
  391. #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>
  392. <cfelse>
  393. <li class="#iif(arraylen(this.crumbdata),de('last'),de('first'))#">
  394. #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)#
  395. </li>
  396. </cfif>
  397. </cfloop>
  398. </ul></cfoutput>
  399. </cfsavecontent>
  400. </cfif>
  401. <cfreturn trim(theNav)>
  402. </cffunction>
  403. <cffunction name="renderIcon" returntype="string" output="false">
  404. <cfargument name="type" type="string" default="">
  405. <cfargument name="fileExt" type="string" default="">
  406. <cfif arguments.type eq 'File'>
  407. <cfreturn lcase(arguments.fileExt)>
  408. <cfelse>
  409. <cfreturn arguments.type>
  410. </cfif>
  411. </cffunction>
  412. <cffunction name="dspPortalNav" output="false" returntype="string">
  413. <cfargument name="class" default="navSecondary" required="true">
  414. <cfset var thenav="" />
  415. <cfset var menutype="" />
  416. <cfif event.getValue('contentBean').getType() eq 'Portal' or event.getValue('contentBean').getType() eq 'Gallery'>
  417. <cfif arraylen(this.crumbdata) gt (this.navParentIdx+this.navOffSet)>
  418. <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)>
  419. <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')) />
  420. <cfelse>
  421. <cfset thenav=dspPeerNav(arguments.class) />
  422. </cfif>
  423. </cfif>
  424. <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')>
  425. <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)>
  426. <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')) />
  427. <cfelse>
  428. <cfset thenav=dspSubNav(arguments.class) />
  429. </cfif>
  430. <cfelse>
  431. <cfset thenav=dspStandardNav(arguments.class) />
  432. </cfif>
  433. <cfreturn thenav />
  434. </cffunction>
  435. <cffunction name="dspStandardNav" output="false" returntype="string">
  436. <cfargument name="class" default="navSecondary" required="true">
  437. <cfset var thenav="" />
  438. <cfset var menutype="" />
  439. <cfif event.getValue('contentBean').getType() neq 'Gallery'>
  440. <cfif arraylen(this.crumbdata) gt (this.navParentIdx+this.navOffSet)>
  441. <cfif this.crumbdata[this.navParentIdx].type eq 'calendar'>
  442. <cfset menutype='fixed'>
  443. <cfelse>
  444. <cfset menutype='default'>
  445. </cfif>
  446. <cfif arraylen(this.crumbdata) gt (this.navGrandParentIdx+this.navOffSet) and not application.contentGateway.getCount(event.getValue('siteID'),this.crumbdata[this.navSelfIdx].contentID)>
  447. <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()) />
  448. <cfelse>
  449. <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()) />
  450. </cfif>
  451. <cfelse>
  452. <cfset theNav=dspSubNav(arguments.class) />
  453. </cfif>
  454. <cfreturn thenav />
  455. <cfelse>
  456. <cfreturn dspPortalNav(arguments.class) />
  457. </cfif>
  458. </cffunction>
  459. <cffunction name="dspSubNav" output="false" returntype="string">
  460. <cfargument name="class" default="navSecondary" required="true">
  461. <cfset var thenav="" />
  462. <cfset var menutype="">
  463. <cfif arraylen(this.crumbdata) gt (this.navSelfIdx+this.navOffSet)>
  464. <cfif this.crumbdata[this.navSelfIdx].type eq 'Calendar'><cfset menutype='fixed'><cfelse><cfset menutype='default'></cfif>
  465. <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()) />
  466. </cfif>
  467. <cfreturn thenav />
  468. </cffunction>
  469. <cffunction name="dspPeerNav" output="false" returntype="string">
  470. <cfargument name="class" default="navSecondary" required="true">
  471. <cfset var thenav="" />
  472. <cfset var menutype = "" />
  473. <cfif event.getContentBean().getContentID() neq '00000000000000000000000000000000001'
  474. and arraylen(this.crumbdata) gt (this.navParentIdx+this.navOffSet)>
  475. <cfif this.crumbdata[this.navParentIdx].type eq 'calendar'>
  476. <cfset menutype='fixed'>
  477. <cfelse>
  478. <cfset menutype='default'>
  479. </cfif>
  480. <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()) />
  481. </cfif>
  482. <cfreturn theNav />
  483. </cffunction>
  484. <cffunction name="dspSequentialNav" output="false" returntype="string">
  485. <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#')>
  486. <cfset var link=''>
  487. <cfset var class=''>
  488. <cfset var itemClass=''>
  489. <cfset var theNav="">
  490. <cfset var current=1>
  491. <cfset var next=1>
  492. <cfset var prev=1>
  493. <cfif rsSection.recordcount and ((event.getValue('r').restrict and event.getValue('r').allow) or (not event.getValue('r').restrict))>
  494. <cfloop query="rsSection">
  495. <cfif rssection.filename eq event.getValue('contentBean').getfilename()>
  496. <cfset prev=iif((rsSection.currentrow - 1) lt 1,de(rsSection.recordcount),de(rsSection.currentrow-1)) />
  497. <cfset current=rsSection.currentrow />
  498. <cfset next=iif((rsSection.currentrow + 1) gt rsSection.recordcount,de(1),de(rsSection.currentrow + 1)) />
  499. </cfif>
  500. </cfloop>
  501. <cfsavecontent variable="theNav">
  502. <cfoutput>
  503. <ul class="navSequential">
  504. <cfif rsSection.contentID[1] neq event.getValue('contentBean').getContentID()>
  505. <li><a href="./?linkServID=#rsSection.contentID[prev]#">&laquo; #getSite().getRBFactory().getKey("sitemanager.prev")#</a></li>
  506. </cfif>
  507. <cfloop query="rsSection">
  508. <cfsilent>
  509. <cfset itemClass=iif(event.getValue('contentBean').getfilename() eq rsSection.filename,de('current'),de('')) />
  510. <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))>
  511. </cfsilent>
  512. <li class="#itemClass#">#link#</li>
  513. </cfloop>
  514. <cfif rsSection.contentID[rsSection.recordcount] neq event.getValue('contentBean').getContentID()>
  515. <li><a href="./?linkServID=#rsSection.contentID[next]#">#getSite().getRBFactory().getKey("sitemanager.next")# &raquo;</a></li>
  516. </cfif>
  517. </ul></cfoutput>
  518. </cfsavecontent>
  519. </cfif>
  520. <cfreturn trim(theNav) />
  521. </cffunction>
  522. <cffunction name="dspGalleryNav" output="false" returntype="string">
  523. <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'))>
  524. <cfset var link=''>
  525. <cfset var class=''>
  526. <cfset var itemClass=''>
  527. <cfset var theNav="">
  528. <cfset var current=1>
  529. <cfset var next=1>
  530. <cfset var prev=1>
  531. <cfif rsSection.recordcount and ((event.getValue('r').restrict and event.getValue('r').allow) or (not event.getValue('r').restrict))>
  532. <cfloop query="rsSection">
  533. <cfif rssection.contentID eq event.getValue('galleryItemID')>
  534. <cfset prev=iif((rsSection.currentrow - 1) lt 1,de(rsSection.recordcount),de(rsSection.currentrow-1)) />
  535. <cfset current=rsSection.currentrow />
  536. <cfset next=iif((rsSection.currentrow + 1) gt rsSection.recordcount,de(1),de(rsSection.currentrow + 1)) />
  537. </cfif>
  538. </cfloop>
  539. <cfsavecontent variable="theNav">
  540. <cfoutput>
  541. <ul class="navSequential">
  542. <li class="first">
  543. <a href="#application.configBean.getIndexFile()#?startrow=#event.getValue('startRow')#&galleryItemID=#rsSection.contentid[prev]#&categoryID=#event.getValue('categoryID')#&relatedID=#event.getValue('relatedID')#">&laquo; Prev</a>
  544. </li>
  545. <cfloop query="rsSection">
  546. <cfsilent>
  547. <cfset itemClass=iif(event.getValue('galleryItemID') eq rsSection.contentID,de('current'),de('')) />
  548. <cfset link='<a href="#application.configBean.getIndexFile()#?startrow=#event.getValue('startRow')#&galleryItemID=#rsSection.contentID#&categoryID=#event.getValue('categoryID')#">#rsSection.currentRow#</a>'>
  549. </cfsilent>
  550. <li class="#itemClass#">#link#</li>
  551. </cfloop>
  552. <li class="last"> <a href="#application.configBean.getIndexFile()#?startrow=#event.getValue('startRow')#&galleryItemID=#rsSection.contentid[next]#&categoryID=#event.getValue('categoryID')#">Next &raquo;</a></li>
  553. </ul></cfoutput>
  554. </cfsavecontent>
  555. </cfif>
  556. <cfreturn trim(theNav) />
  557. </cffunction>
  558. <cffunction name="dspSessionNav" output="false" returntype="string">
  559. <cfargument name="id" type="string" default="">
  560. <cfset var returnUrl = "" />
  561. <cfset var thenav = "" />
  562. <cfif event.getValue('returnURL') neq "">
  563. <cfset returnUrl = event.getValue('returnURL')>
  564. <cfelse>
  565. <cfset returnURL = URLEncodedFormat('#application.contentRenderer.getCurrentURL()#')>
  566. </cfif>
  567. <cfsavecontent variable="theNav">
  568. <cfif getSite().getExtranet() eq 1 and session.mura.isLoggedIn>
  569. <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>
  570. </cfif>
  571. </cfsavecontent>
  572. <cfreturn trim(thenav) />
  573. </cffunction>
  574. <cffunction name="dspTagCloud" access="public" output="false" returntype="string">
  575. <cfargument name="parentID" type="any" required="true" default="" />
  576. <cfargument name="categoryID" type="any" required="true" default="" />
  577. <cfargument name="rsContent" type="any" required="true" default="" />
  578. <cfset var theIncludePath = event.getSite().getIncludePath() />
  579. <cfset var fileDelim = application.configBean.getFileDelim() />
  580. <cfset var filePath = theIncludePath & fileDelim & "includes" & fileDelim />
  581. <cfset var theContent = "" />
  582. <cfset var theme =$.siteConfig("theme")>
  583. <cfset var expandedPath=expandPath(filePath)>
  584. <cfset var str="">
  585. <cfsavecontent variable="str">
  586. <cfif fileExists(expandedPath & "themes/" & theme & "/display_objects/nav/dsp_tag_cloud.cfm")>
  587. <cfinclude template="#filePath#themes/#theme#/display_objects/nav/dsp_tag_cloud.cfm" />
  588. <cfelseif fileExists(expandedPath & "display_objects/custom/nav/dsp_tag_cloud.cfm")>
  589. <cfinclude template="#filePath#display_objects/custom/nav/dsp_tag_cloud.cfm" />
  590. <cfelse>
  591. <cfinclude template="#filePath#display_objects/nav/dsp_tag_cloud.cfm" />
  592. </cfif>
  593. </cfsavecontent>
  594. <cfreturn str />
  595. </cffunction>
  596. <cffunction name="getURLStem" access="public" output="false" returntype="string">
  597. <cfargument name="siteID">
  598. <cfargument name="filename">
  599. <cfif len(arguments.filename)>
  600. <cfif left(arguments.filename,1) neq "/">
  601. <cfset arguments.filename= "/" & arguments.filename>
  602. </cfif>
  603. <cfif right(arguments.filename,1) neq "/">
  604. <cfset arguments.filename= arguments.filename & "/">
  605. </cfif>
  606. </cfif>
  607. <cfif not application.configBean.getSiteIDInURLS()>
  608. <cfif arguments.filename neq ''>
  609. <cfif application.configBean.getStub() eq ''>
  610. <cfif application.configBean.getIndexFileInURLS() and not request.muraExportHTML>
  611. <cfreturn "/index.cfm" & arguments.filename />
  612. <cfelse>
  613. <cfreturn arguments.filename />
  614. </cfif>
  615. <cfelse>
  616. <cfreturn application.configBean.getStub() & arguments.filename />
  617. </cfif>
  618. <cfelse>
  619. <cfreturn "/" />
  620. </cfif>
  621. <cfelse>
  622. <cfif arguments.filename neq ''>
  623. <cfif not len(application.configBean.getStub())>
  624. <cfif application.configBean.getIndexFileInURLS()>
  625. <cfreturn "/" & arguments.siteID & "/index.cfm" & arguments.filename />
  626. <cfelse>
  627. <cfreturn "/" & arguments.siteID & arguments.filename />
  628. </cfif>
  629. <cfelse>
  630. <cfreturn application.configBean.getStub() & "/" & arguments.siteID & arguments.filename />
  631. </cfif>
  632. <cfelse>
  633. <cfif not len(application.configBean.getStub())>
  634. <cfreturn "/" & arguments.siteID & "/" />
  635. <cfelse>
  636. <cfreturn application.configBean.getStub() & "/" & arguments.siteID & "/" />
  637. </cfif>
  638. </cfif>
  639. </cfif>
  640. </cffunction>
  641. <cffunction name="createHREF" returntype="string" output="false" access="public">
  642. <cfargument name="type" required="true" default="Page">
  643. <cfargument name="filename" required="true">
  644. <cfargument name="siteid" required="true" default="">
  645. <cfargument name="contentid" required="true" default="">
  646. <cfargument name="target" required="true" default="">
  647. <cfargument name="targetParams" required="true" default="">
  648. <cfargument name="querystring" required="true" default="">
  649. <cfargument name="context" type="string" required="true" default="#application.configBean.getContext()#">
  650. <cfargument name="stub" type="string" required="true" default="#application.configBean.getStub()#">
  651. <cfargument name="indexFile" type="string" required="true" default="">
  652. <cfargument name="complete" type="boolean" required="true" default="false">
  653. <cfargument name="showMeta" type="string" required="true" default="0">
  654. <cfset var href=""/>
  655. <cfset var tp=""/>
  656. <cfset var begin=iif(arguments.complete,de('http://#application.settingsManager.getSite(arguments.siteID).getDomain()##application.configBean.getServerPort()#'),de('')) />
  657. <cfset var fileBean="">
  658. <cfif len(arguments.querystring) and not left(arguments.querystring,1) eq "?">
  659. <cfset arguments.querystring="?" & arguments.querystring>
  660. </cfif>
  661. <cfswitch expression="#arguments.type#">
  662. <cfcase value="Link,File">
  663. <cfif not request.muraExportHTML>
  664. <cfset href=HTMLEditFormat("#begin##arguments.context##getURLStem(arguments.siteid,'linkservid/#arguments.contentid#/showMeta/#arguments.showMeta#')##arguments.querystring#")/>
  665. <cfelseif arguments.type eq "Link">
  666. <cfset href=arguments.filename>
  667. <cfelse>
  668. <cfset fileBean=$.getBean("content").loadBy(contentID=arguments.contentID)>
  669. <cfset href="#arguments.context#/#arguments.siteID#/cache/file/#fileBean.getFileID()#/#fileBean.getFilename()#">
  670. </cfif>
  671. </cfcase>
  672. <cfdefaultcase>
  673. <cfset href=HTMLEditFormat("#begin##arguments.context##getURLStem(arguments.siteid,'#arguments.filename#')##arguments.querystring#") />
  674. </cfdefaultcase>
  675. </cfswitch>
  676. <cfif arguments.target eq "_blank" and arguments.showMeta eq 0>
  677. <cfset tp=iif(arguments.targetParams neq "",de(",'#arguments.targetParams#'"),de("")) />
  678. <cfset href="javascript:newWin=window.open('#href#','NewWin#replace('#rand()#','.','')#'#tp#);newWin.focus();void(0);" />
  679. </cfif>
  680. <cfreturn href />
  681. </cffunction>
  682. <cffunction name="createHREFforRSS" returntype="string" output="false" access="public">
  683. <cfargument name="type" required="true" default="Page">
  684. <cfargument name="filename" required="true">
  685. <cfargument name="siteid" required="true">
  686. <cfargument name="contentid" required="true" default="">
  687. <cfargument name="target" required="true" default="">
  688. <cfargument name="targetParams" required="true" default="">
  689. <cfargument name="context" type="string" default="#application.configBean.getContext()#">
  690. <cfargument name="stub" type="string" default="#application.configBean.getStub()#">
  691. <cfargument name="indexFile" type="string" default="">
  692. <cfargument name="showMeta" type="string" default="0">
  693. <cfargument name="fileExt" type="string" default="" required="true">
  694. <cfset var href=""/>
  695. <cfset var tp=""/>
  696. <cfset var begin="http://#application.settingsManager.getSite(arguments.siteID).getDomain()##application.configBean.getServerPort()#" />
  697. <cfswitch expression="#arguments.type#">
  698. <cfcase value="Link">
  699. <cfset href="#begin##arguments.context##getURLStem(arguments.siteid,'')#?LinkServID=#arguments.contentid#&showMeta=#arguments.showMeta#"/>
  700. </cfcase>
  701. <cfcase value="File">
  702. <cfset href="#begin##arguments.context##getURLStem(arguments.siteid,'')#?LinkServID=#arguments.contentid#&showMeta=#arguments.showMeta#&fileExt=.#arguments.fileExt#"/>
  703. </cfcase>
  704. <cfdefaultcase>
  705. <cfset href="#begin##arguments.context##getURLStem(arguments.siteid,'#arguments.filename#')#" />
  706. </cfdefaultcase>
  707. </cfswitch>
  708. <cfreturn href />
  709. </cffunction>
  710. <cffunction name="createHREFForImage" output="false" returntype="any">
  711. <cfargument name="siteID">
  712. <cfargument name="fileID">
  713. <cfargument name="fileExt">
  714. <cfargument name="size" required="true" default="large">
  715. <cfargument name="direct" required="true" default="#this.directImages#">
  716. <cfargument name="complete" type="boolean" required="true" default="false">
  717. <cfargument name="height" default=""/>
  718. <cfargument name="width" default=""/>
  719. <cfset var imgSuffix=arguments.size>
  720. <cfset var returnURL="">
  721. <cfset var begin="">
  722. <cfif not structKeyExists(arguments,"fileEXT")>
  723. <cfset arguments.fileEXT=getBean("fileManager").readMeta(arguments.fileID).fileEXT>
  724. </cfif>
  725. <cfif not structKeyExists(arguments,"siteID")>
  726. <cfset arguments.siteID=session.siteID>
  727. </cfif>
  728. <cfset begin=iif(arguments.complete,de('http://#application.settingsManager.getSite(arguments.siteID).getDomain()##application.configBean.getServerPort()#'),de('')) />
  729. <cfif request.muraExportHtml>
  730. <cfset arguments.direct=true>
  731. </cfif>
  732. <cfif arguments.direct and application.configBean.getFileStore() eq "fileDir">
  733. <cfif not len(arguments.width) and not len(arguments.height)>
  734. <cfif imgSuffix eq "large">
  735. <cfset imgSuffix="">
  736. <cfelse>
  737. <cfset imgSuffix="_" & imgSuffix>
  738. </cfif>
  739. <cfset returnURL=application.configBean.getAssetPath() & "/" & arguments.siteID & "/cache/file/" & arguments.fileID & imgSuffix & "." & arguments.fileEXT>
  740. <cfelse>
  741. <cfif not len(arguments.width)>
  742. <cfset arguments.width="auto">
  743. </cfif>
  744. <cfif not len(arguments.height)>
  745. <cfset arguments.height="auto">
  746. </cfif>
  747. <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)>
  748. </cfif>
  749. <cfelse>
  750. <cfif imgSuffix eq "large">
  751. <cfset imgSuffix="file">
  752. </cfif>
  753. <cfset returnURL=application.configBean.getContext() & "/tasks/render/" & imgSuffix & "/?fileID=" & arguments.fileID & "&fileEXT=" & arguments.fileEXT>
  754. </cfif>
  755. <cfreturn begin & returnURL>
  756. </cffunction>
  757. <cffunction name="addlink" output="false" returntype="string">
  758. <cfargument name="type" required="true">
  759. <cfargument name="filename" required="true">
  760. <cfargument name="title" required="true">
  761. <cfargument name="target" type="string" default="">
  762. <cfargument name="targetParams" type="string" default="">
  763. <cfargument name="contentid" required="true">
  764. <cfargument name="siteid" required="true">
  765. <cfargument name="querystring" type="string" required="true" default="">
  766. <cfargument name="context" type="string" required="true" default="#application.configBean.getContext()#">
  767. <cfargument name="stub" type="string" required="true" default="#application.configBean.getStub()#">
  768. <cfargument name="indexFile" type="string" required="true" default="">
  769. <cfargument name="showMeta" type="string" required="true" default="0">
  770. <cfargument name="showCurrent" type="string" required="true" default="1">
  771. <cfargument name="class" type="string" required="true" default="">
  772. <cfargument name="complete" type="boolean" required="true" default="false">
  773. <cfargument name="id" type="string" required="true" default="">
  774. <cfset var link ="">
  775. <cfset var href ="">
  776. <cfset var theClass =arguments.class>
  777. <cfif arguments.showCurrent and listFind(event.getValue('contentBean').getPath(),"#arguments.contentID#")>
  778. <cfset theClass=listAppend(theClass,"current"," ") />
  779. </cfif>
  780. <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)>
  781. <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>' />
  782. <cfreturn link>
  783. </cffunction>
  784. <cffunction name="dspObject_Render" access="public" output="false" returntype="string">
  785. <cfargument name="siteid" type="string" />
  786. <cfargument name="object" type="string" />
  787. <cfargument name="objectid" type="string" />
  788. <cfargument name="fileName" type="string" />
  789. <cfargument name="cacheKey" type="string" required="false" />
  790. <cfargument name="hasSummary" type="boolean" required="false" default="true" />
  791. <cfargument name="useRss" type="boolean" required="false" default="false" />
  792. <cfset var theContent=""/>
  793. <cfset var objectPerm="none">
  794. <cfif session.mura.isLoggedIn and this.showEditableObjects>
  795. <cfset objectPerm=application.permUtility.getDisplayObjectPerm(arguments.siteID,arguments.object,arguments.objectID)>
  796. </cfif>
  797. <cfif StructKeyExists(arguments,"cacheKey") and objectPerm neq "editor">
  798. <cfsavecontent variable="theContent">
  799. <cf_CacheOMatic key="#arguments.cacheKey#" nocache="#event.getValue('nocache')#">
  800. <cfoutput>#dspObject_Include(arguments.siteid,arguments.object,arguments.objectid,arguments.fileName,arguments.hasSummary,arguments.useRss)#</cfoutput>
  801. </cf_cacheomatic>
  802. </cfsavecontent>
  803. <cfelse>
  804. <cfset theContent = dspObject_Include(arguments.siteid,arguments.object,arguments.objectid,arguments.fileName,arguments.hasSummary,arguments.useRss,objectPerm) />
  805. </cfif>
  806. <cfreturn theContent />
  807. </cffunction>
  808. <cffunction name="dspObject_Include" access="public" output="false" returntype="string">
  809. <cfargument name="siteid" type="string" />
  810. <cfargument name="object" type="string" />
  811. <cfargument name="objectid" type="string" />
  812. <cfargument name="theFile" type="string" />
  813. <cfargument name="hasSummary" type="boolean" required="true" default="false"/>
  814. <cfargument name="RSS" type="boolean" required="true" default="false" />
  815. <cfargument name="objectPerm" type="string" required="true" default="none" />
  816. <cfset var fileDelim = application.configBean.getFileDelim() />
  817. <cfset var displayObjectPath = $.siteConfig('IncludePath') & fileDelim & "includes" & fileDelim & "display_objects"/>
  818. <cfset var themeObjectPath = $.siteConfig('ThemeIncludePath') & fileDelim & "display_objects"/>
  819. <cfset var themePath = $.siteConfig('themeAssetPath') />
  820. <cfset var useRss = arguments.RSS />
  821. <cfset var bean = "" />
  822. <cfset var theContent = "" />
  823. <cfset var editableControl = structNew()>
  824. <cfset var expandedDisplayObjectPath=expandPath(displayObjectPath)>
  825. <cfset var expandedThemeObjectPath=expandPath(themeObjectPath)>
  826. <cfsavecontent variable="theContent">
  827. <cfif fileExists(expandedThemeObjectPath & fileDelim & arguments.theFile)>
  828. <cfinclude template="#themeObjectPath#/#arguments.theFile#" />
  829. <cfelseif fileExists(expandedDisplayObjectPath & fileDelim & "custom" & fileDelim & arguments.theFile)>
  830. <cfinclude template="#displayObjectPath#/custom/#arguments.theFile#" />
  831. <cfelse>
  832. <cfinclude template="#displayObjectPath#/#arguments.theFile#" />
  833. </cfif>
  834. </cfsavecontent>
  835. <cfreturn theContent />
  836. </cffunction>
  837. <cffunction name="dspObject" access="public" output="false" returntype="string">
  838. <cfargument name="object" type="string">
  839. <cfargument name="objectid" type="string" required="true" default="">
  840. <cfargument name="siteid" type="string" required="true" default="#event.getValue('siteID')#">
  841. <cfargument name="params" type="string" required="true" default="">
  842. <cfset var theObject = "" />
  843. <cfset var cacheKeyContentId = arguments.object & event.getValue('contentBean').getcontentID() />
  844. <cfset var cacheKeyObjectId = arguments.object & arguments.objectid />
  845. <cfsavecontent variable="theObject">
  846. <cfoutput>
  847. <cfswitch expression="#arguments.object#">
  848. <cfcase value="sub_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_sub.cfm",cacheKeyContentId)#</cfcase>
  849. <cfcase value="peer_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_peer.cfm",cacheKeyContentId)#</cfcase>
  850. <cfcase value="standard_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_standard.cfm",cacheKeyContentId)#</cfcase>
  851. <cfcase value="portal_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_portal.cfm",cacheKeyContentId)#</cfcase>
  852. <cfcase value="multilevel_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_multilevel.cfm",cacheKeyContentId)#</cfcase>
  853. <cfcase value="seq_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_sequential.cfm","#arguments.object##arguments.objectid##event.getValue('startRow')#")#</cfcase>
  854. <cfcase value="top_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/dsp_top.cfm",cacheKeyContentId)#</cfcase>
  855. <cfcase value="contact">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_contact.cfm")#</cfcase>
  856. <cfcase value="calendar_nav">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"nav/calendarNav/index.cfm")#</cfcase>
  857. <cfcase value="plugin">#application.pluginManager.displayObject(object=arguments.objectid,event=event,params=arguments.params)#</cfcase>
  858. <cfcase value="mailing_list">#dspObject_Render(siteid=arguments.siteid,object=arguments.object,objectid=arguments.objectid,fileName="dsp_mailing_list.cfm")#</cfcase>
  859. <cfcase value="mailing_list_master">#dspObject_Render(siteid=arguments.siteid,object=arguments.object,objectid=arguments.objectid,fileName="dsp_mailing_list_master.cfm")#</cfcase>
  860. <cfcase value="site_map">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_site_map.cfm",cacheKeyObjectId)#</cfcase>
  861. <cfcase value="features">
  862. <cfset addToHTMLHeadQueue("listImageStyles.cfm")>
  863. #dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_features.cfm",cacheKeyObjectId)#
  864. </cfcase>
  865. <cfcase value="features_no_summary">
  866. <cfset addToHTMLHeadQueue("listImageStyles.cfm")>
  867. #dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_features.cfm",cacheKeyObjectId,false)#
  868. </cfcase>
  869. <cfcase value="category_features">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_category_features.cfm",cacheKeyObjectId)#</cfcase>
  870. <cfcase value="category_features_no_summary">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_category_features.cfm",cacheKeyObjectId,false)#</cfcase>
  871. <cfcase value="category_portal_features">#dspObject_Render(arguments.siteid,arguments.object,arguments.objectid,"dsp_category_portal_features.cfm",cacheKeyObjectId)#</cfcase>
  872. <cfcase value="category_portal_fea