Share Pastebin
Guest
Public paste!

cfalzone

By: a guest | Nov 10th, 2009 | Syntax: None | Size: 0.58 KB | Hits: 84 | Expires: Never
Copy text to clipboard
  1. #pullContent("+structureInode:12345" "0" "text1")
  2. #set($firstLetter = "")
  3. #set($first = true)
  4. #foreach($content in $list)
  5.   #if($content.title.substring(0, 2).equals($firstLetter)
  6.     #if($first)
  7.       #set($first = false)
  8.     #else
  9.       <p><a href="#top">Back to top</a></p>
  10.     #end
  11.     <h4><a name="${content.title.substring(0, 2)}" id="${content.title.substring(0, 2)}"></a>${content.title.substring(0, 2)}</h4>
  12.     #set($firstLetter = $content.title.substring(0, 2))
  13.   #end
  14.  
  15.   <!-- Do what you need for the listing -->
  16.  
  17. #end
  18. <p><a href="#top">Back to top</a></p>