[opencms-dev] more questions on path conversion

Christoph P. Kukulies kuku at physik.rwth-aachen.de
Wed Mar 22 17:07:30 CET 2006


Thanks to recent help from this list and a code snippet I found while
digging in the archives I'm stuck with the following problem:


CmsJspActionElement cms =
   new CmsJspActionElement(pageContext, request, response);
   String currentUri = cms.getRequestContext().getUri();
   CmsObject o = cms.getCmsObject();
      String strPagename = cms.getRequestContext().getUri();
      out.write(currentUri + "<br>");
      List siblings = o.readSiblings(strPagename, CmsResourceFilter.ALL);
      for (int i = 0, l = siblings.size(); i < l; i++) {
                String vfsName =
((CmsResource)siblings.get(i)).getRootPath();
                out.write(vfsName + "<br>");
        }

gives me e.g.:

/de/index.html

/sites/mysite/de/index.html
/sites/mysite/en/index.html


With what method() di I get rid of the /sites/mysite prefix?


--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de



More information about the opencms-dev mailing list