Andy Jarrett // Code. Develop. Create.

CFTreeitem and node images

One thing i am loving about CF8 is the HTML format <cftree> and <cftreeitem>, and one cool feature is the node images though I keep forgetting what's available (hence a blog post to remind me later) As well as the default images:
  • computer
  • document
  • element
  • folder
  • floppy
  • fixed
  • remote
You can also add custom images by declaring a path instead one of the above names.<cfform><cftree name="myTree" format="html"> <cftreeitem value="val1" display="folder child node" img="folder" /> <cftreeitem value="val2" display="computer child node" img="computer" /> <cftreeitem value="val3" display="element child node" img="element" /> <cftreeitem value="val4" display="document child node" img="document" /> <cftreeitem value="val5" display="remote child node" img="remote" /> <cftreeitem value="val6" display="floppy child node" img="floppy" /> <cftreeitem value="val7" display="fixed child node" img="fixed" /> <cftreeitem value="val7" display="custom image child node" img="http://www.andyjarrett.co.uk/andy/blog/img/blogimg/emoticon_tongue.png" /></cftree></cfform>The above code will give you:

Node images


I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee. Your support keeps this site running and the coffee brewing! ☕️