Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

cfalzone

By: a guest on Nov 10th, 2009  |  syntax: None  |  size: 0.58 KB  |  hits: 86  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  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>