Skip to content

Instantly share code, notes, and snippets.

@jsieber
Last active August 29, 2015 14:24
Show Gist options
  • Save jsieber/146a98675e479ead3547 to your computer and use it in GitHub Desktop.
Save jsieber/146a98675e479ead3547 to your computer and use it in GitHub Desktop.
Add Category to top of folder content listing if present for specific contentID.
<!--- Place alert about category display if showing blog category results. This is added into a custom version of dsp_Folder.cfm --->
<cfset categoryBean = variables.$.getBean('category').loadBy(categoryID='#variables.$.event('categoryID')#', siteid=variables.$.event('siteid'))>
<cfif len(categoryBean.getName()) and variables.$.content('contentId') eq "2A66AE85-77CB-407F-B3FCD352EC6F64B8">
<div class="alert alert-success">Blog posts in the "#categoryBean.getName()#" category. <a href="/resources/blog">Return</a> to the full blog.</div>
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment