Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jsieber/b7eb3ba17ed7269946fb8492423f09dc to your computer and use it in GitHub Desktop.
Save jsieber/b7eb3ba17ed7269946fb8492423f09dc to your computer and use it in GitHub Desktop.

Revisions

  1. @stevewithington stevewithington revised this gist Dec 5, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion muraCategoryIteratorExamples.cfm
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@
    </cfloop>
    </ul>
    <cfelse>
    <p><em>This content either has NO children, OR its none of its children have been categorized.</em></p>
    <p><em>This content either has NO children, OR none of its children have been categorized.</em></p>
    </cfif>

    <!--- CURRENT Content Node --->
  2. @stevewithington stevewithington created this gist Nov 29, 2012.
    33 changes: 33 additions & 0 deletions muraCategoryIteratorExamples.cfm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    <cfscript>
    // Category Iterator of Children of the Current Content Node
    itKidsCats = $.content().getKidsCategoryIterator();
    // Category Iterator of the CURRENT Content Node
    itCats = $.content().getCategoriesIterator();
    </cfscript>
    <cfoutput>
    <!--- Children of the Current Content Node --->
    <h4>Kids Categories</h4>
    <cfif itKidsCats.hasNext()>
    <ul>
    <cfloop condition="itKidsCats.hasNext()">
    <cfset kidItem = itKidsCats.next()>
    <li>#HTMLEditFormat(kidItem.getName())#</li>
    </cfloop>
    </ul>
    <cfelse>
    <p><em>This content either has NO children, OR its none of its children have been categorized.</em></p>
    </cfif>

    <!--- CURRENT Content Node --->
    <h4>Current Content Node's Categories</h4>
    <cfif itCats.hasNext()>
    <ul>
    <cfloop condition="itCats.hasNext()">
    <cfset thisItem = itCats.next()>
    <li>#HTMLEditFormat(thisItem.getName())#</li>
    </cfloop>
    </ul>
    <cfelse>
    <p><em>This content has NOT been categorized.</em></p>
    </cfif>
    </cfoutput>