Get all Categories in a Category Select


Use this to pull all selected categories in a widget category select. After you use this code to grab them you can make it part your dotcontent.pull query like this:



#foreach($inode in $categoriesToDisplay)
    #if($velocityCount == 1)
         #set($catlist = $categories.getCategoryByInode($inode).getCategoryVelocityVarName())
         #set($catlist = "$catlist $categories.getCategoryByInode($inode).getCategoryVelocityVarName()")

Have you created code you'd like to share with the dotCMS community?

Share your code Become a Contributor