[opencms-dev] Navigation Issues
Jonathan Woods
jonathan.woods at scintillance.com
Fri Jun 16 17:23:04 CEST 2006
Sorry; I didn't pick up on the fact you're starting from an example
template. All I meant was that you may have to write your own code in
left_nav.jsp rather than relying on template methods. That may mean digging
around in the API and writing Java (as opposed to taglib stuff).
There are lots of useful methods in CmsJspNavBuilder which might start you
off:
<%
// Start from the usual place for writing OpenCms JSP scriptlets:
CmsJspActionElement cmsJspActionElement = new CmsJspActionElement();
cmsJspActionElement.init(pageContext, request, response);
// Get a CmsJspNavBuilder and do with it what you will:
navigationBuilder = new CmsJspNavBuilder(cmsObject);
/* And see the API for CmsJspNavBuilder for ideas:
http://www.opencms.org/export/javadoc/core/org/opencms/jsp/CmsJspNavBuilder.
html
*/
%>
Jon
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Colin Coolidge
Sent: 16 June 2006 16:03
To: The OpenCms mailing list
Subject: RE: [opencms-dev] Navigation Issues
I'm not sure I fully understand. I have a template page that uses the
header, footer and left nav pieces from the elements folder. I grapped some
code from the search example in the Alkon folder and made it work in my
left_nav.jsp element. Right now it just shows the main directory links
everywhere, regardless of tier.
--- Jonathan Woods <jonathan.woods at scintillance.com>
wrote:
> You don't say how you're planning to deliver the navigation. Assuming
> you're writing your own code, you just need to check before rendering
> a link (or the page name without a link) that it corresponds to a
> resource directly in the folder of the current resource.
>
> There are lots of methods in CmsResource and CmsJspActionElement which
> should help with this, if you're writing scriplet code; these are
> probably also reflected in the tag lib too.
>
> Jon
>
> _____
>
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Colin Coolidge
> Sent: 16 June 2006 15:42
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] Navigation Issues
>
>
> Hi,
>
> I've been migrating a website over from 5 to 6 and want to use the
> navigation features in 6. I have something setup like this:
>
> main_site_directory/index.html
> main_site_directory/page.html
> main_site_directory/page2.html
> main_site_directory/category/index.html
> main_site_directory/category/subcategory/index.html
>
> My problem is when I'm in each tier, I want only those page of the
> current tier to show up in the left nav. For instance, the left nav
> for the main_site_directory/index.html page should have
> just:
>
> main_site_directory/index.html (not a link)
> main_site_directory/page.html (link) main_site_directory/page2.html
> (link)
>
> listed in the left nav...
>
>
>
>
> thanks
>
>
> _____
>
> Yahoo!
>
<http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.com/ev
> t=39666/*http://messenger.yahoo.com> Messenger with Voice. PC-to-Phone
> calls for ridiculously low rates.
> >
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change
> your list options, or to unsubscribe from the list, please visit
>
http://lists.opencms.org/mailman/listinfo/opencms-dev
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your
list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list