[opencms-dev] Link resolving with OpenCms API

Andras Balogh abalogh at gmail.com
Fri Dec 16 17:25:44 CET 2005


Hello,

    The method you are talking about  doesn't require the 
/opencms/opencms/ prefix.
This works with the VFS paths not the real path.
You should use only getNavigationForFolder("/mysite/eng/index.html");
      Even if in Offline project you should always work and preview your 
pages in "/sites/default/" selected
in the top dropdown not "/".

Best regards,
Andras.

Uhlig, Roman wrote:

>Hi,
>
>I'd like to resolve a link with the CmsJspActionElement.link(String)
>method with a scriptlet within a JSP page like that:
>
>CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
>response);
>java.util.List nav_element_list =
>cms.getNavigation().getNavigationForFolder(cms.link("/sites/default/mysi
>te/eng/index.html"));
>
>Unfortunately the cms.link() method returns
>"/opencms/opencms/sites/default/mysite/eng/index.html" instead of
>"/sites/default/mysite/eng/index.html", which causes the
>getNavigationForFolder() method to fail. If I hardcode the path,
>everythings works fine, but I have of course no link resolving in the
>online project.
>
>Any ideas someone?
>
>Thank you in advance,
>Roman Uhlig
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>  
>




More information about the opencms-dev mailing list