Get all Categories in a Category Select

Description

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:

+(categories:$catlist)

Code

${esc.hash}foreach(${esc.dollar}inode in ${esc.dollar}categoriesToDisplay)
    ${esc.hash}if(${esc.dollar}velocityCount == 1)
         ${esc.hash}set(${esc.dollar}catlist = ${esc.dollar}categories.getCategoryByInode(${esc.dollar}inode).getCategoryVelocityVarName())
    ${esc.hash}else
         ${esc.hash}set(${esc.dollar}catlist = "${esc.dollar}catlist ${esc.dollar}categories.getCategoryByInode(${esc.dollar}inode).getCategoryVelocityVarName()")
    ${esc.hash}end
${esc.hash}end