[opencms-dev] Another way for bread crump

Ivan Jelenic ivan.jelenic at nbs.yu
Fri Jul 18 11:00:02 CEST 2003


Hi,

We used this for bread crump:

<%
// Create a JSP action element
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response);

// Create a string of requested file
String filename = cms.getRequestContext().getUri();

int real = 0;
int x = 0;
String target = "";
while(x < filename.lastIndexOf("/")){
 if (filename.charAt(x) == '/') {
  real = x;
  x = x + 1;
  while (filename.charAt(x) != '/') x = x + 1;
  target = target + "/" + filename.substring(real + 1, x);
  out.println("<a href=\"" + cms.link(target + "/index.html") + "\">" + filename.substring(real + 1, x) + "</a>" + " : ");
 }
}
out.println(filename.substring(filename.lastIndexOf("/")+1));
%>

Hope it's help.

Best regards, Ivan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20030718/11383807/attachment.htm>


More information about the opencms-dev mailing list