Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #set($thisUrl = $request.getAttribute("javax.servlet.forward.request_uri"))
- #set($thisUrl = $thisUrl.replaceAll("index\.html$","")) ## Ignore the index.html for the purposes of the crumbtrail
- #if($thisUrl.matches("^.*\/[^\/]+$")) ## If there is something after the last slash
- #set($isSubPage = true)
- #else
- #set($isSubPage = false)
- #end
- #set($thisUrl = $thisUrl.replaceAll("[^\/]*$","")) ## Strip off filename
- #set($listFromUrl = $thisUrl.split("/") )
- #set($listSize = $listFromUrl.size())
- <ul class="breadcrumb">
- <li><a href="/">OC</a><span class="crumbsep">›</span> </li>
- #set($currentUrl = "")
- #foreach ($piece in $listFromUrl)
- #if($piece != "")
- #set($currentUrl = $currentUrl + "/" + $piece)
- #set($currentFolder= $folderAPI.findCurrentFolder($currentUrl,$host))
- <li><a href="$!{currentUrl}">$!{currentFolder.title}</a><span class="crumbsep">›</span> </li>
- #end
- #end
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment