[opencms-dev] Opencms Navigation Modification
Isaac Tuuri
ituuri at 5square.com
Thu Jan 19 18:38:55 CET 2006
Make the relevant template segment NOT editable, right now its an
editable block is why it gets that link box.
________________________________
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Colin Coolidge
Sent: Thursday, January 19, 2006 9:25 AM
To: The OpenCms mailing list
Subject: RE: [opencms-dev] Opencms Navigation Modification
OK...next how do I get rid of the opencms symbol that is part of the
'body' in the attached jpg?
Phil.Launchbury at tssi.co.uk wrote:
I ran into the same problem and solved it by using one of the
other property fields (Navinfo I think) as a menu level indicator. I
then added a bit of extra code (BTW - I'm not a programmer so any errors
are strictly my own or the website where I stole the bits of code from
:-) ) to the process that creates the menus as follows:
while (i.hasNext())
{
CmsJspNavElement ne = (CmsJspNavElement)i.next();
String resource_name = ne.getResourceName();
String menu_level = ne.getInfo();
if (menu_level == null)
{
menu_level = "9";
}
// if we have a directory then make a new menu
if ((resource_name.charAt(resource_name.length() - 1) == '/')
&& (menu_level.equals("1")))
{
if ((menu_open) && (menu_level.equals("1")))
{
out.println(MenuEnd());
++menu_id;
cell_id = 1;
menu_bar += MenuBarDivider();
}
out.println(MenuStart(menu_id));
menu_open = true;
menu_bar += MenuBarEntry(menu_id, ne.getNavText());
}
else // otherwise just add the menu entry
{
if ((menu_open) && (menu_level.equals("2")))
{
out.println(MenuItem(ne.getNavText(), menu_id,
cms.link(ne.getResourceName()), cell_id));
++cell_id;
}
}
}
That now gives me the two layers of menu - if n avinfo contains
1 then it is a top-level menu item and if it contains 2 then it appears
in the drop-down.
Hope this helps..
Cheers,
Phil.
Phil Launchbury
IT Manager
------------------------------------------------------
TSSI Systems Ltd,
Rutland House, Har greaves Road,
Groundwell Industrial Estate,
Swindon, Wiltshire, SN25 5AZ, U.K.
Tel: +44 (0) 8450 707 898
Email: support at tssi.co.uk
Website: www.tssi.co.uk
'Securing Business Around the World'
-------------------------------------------------------
________________________________
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of
frank.michel at gmail.com
Sent: 19 January 2006 14:04
To: joe at galway.net; opencms-dev at opencms.org
Subject: Re: [opencms-dev] Opencms Navigation Modification
Hi,
I'm looking for a similar thing:
I want to see all 1st level navigation entries and the ones that
are in the actual opened folder on the second level.
Using the getNavigationForFolder I can get the top level or a ll
sublevel.
But how can I get only the actual sublevel when inside?
And: how can I identify that I am on the index.html of a
subfolder?
With navi.getResourceName().equals(filename)) I can verify it
for other documents but that does not work for the index.html.
Any ideas or best practices?
Thanks in advance!
Frank
On 1/19/06, Joe Desbonnet < jdesbonnet at gmail.com
<mailto:jdesbonnet at gmail.com> > wrote:
You can make navigation any way you want with a few lines of
script.
Eg this will create
a bread crumb trail:
<%
{
Iterator iter =
navBuilder.getNavigationBreadCrumb().iterator();
iter.next();
out.write("<a href=\"" + cms.link ("/") + "\">Home</a>
");
while (iter.hasNext()) {
CmsJspNavElement nav =
(CmsJspNavElement)iter.next();
out.write(" > <a href=\"" +
cms.link(nav.getResourceName()) +
"\">" + nav.getNavText() + "</a> ");
}
}
%>
Also remember that you can style LI tags any way you want with
CSS --
I've even seen UL/LI being used to create horizantal tabs.
Joe.
On 1/18/06, Colin Coolidge <colincoolidge at yahoo.com> wrote:
> I see that by default the left nav puts all the entries in
<li> </li> tags.
> Where can I change this?
>
> looks like somewhere in here????: <%=
cms.buildNavigationLeft() %>
>
> ________________________________
> Yahoo! Photos
> Got holiday prints? See all the ways to get quality prints in
your hands
> ASAP.
>
>
>
> _______________________________________________
> 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
>
>
_______________________________________________
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
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a
proactive
anti-virus service working around the clock, around the globe,
visit:
http://www.star.net.uk
________________________________________________________________________
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a
proactive
anti-virus service working around the clock, around the globe,
visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
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
________________________________
Yahoo! Photos
Ring in the New Year with Photo Calendars
<http://us.rd.yahoo.com/mail_us/taglines/photos/*http:/pa.yahoo.com/*htt
p:/us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http:/pg.photos.ya
hoo.com/ph/page?.file=calendar_splash.html&.dir=> . Add photos, events,
holidays, whatever.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060119/222e0c4d/attachment.htm>
More information about the opencms-dev
mailing list