Display Categories on Content - Documentation topics on: categories,pulling and displaying categories on content,.

This documentation is a static copy for this version. For current documentation, see: http://dotcms.com/docs/latest

Display Categories on Content

Consider the following example which shows how to print out how content is categorized while iterating in Velocity over the following Content Type.

Here is the code that is supposed to be there:
#foreach($news in $dotcontent.pull("+contentType:News",10,"modDate desc"))
     $velocityCount. HEADLINE: $!{news.title}</br> 
     #foreach($cat in $news.topic)
           CAT NAME: $!{cat.categoryName}</br> 
           CAT KEY: $!{cat.key}</br>
   ## See entire category object and all properties for diagnostic purposes
           CATEGORY OBJECT IN LOOP : $!{cat}<br/>
     #end ##end of cat foreach
#end ##end of news foreach