[opencms-dev] CmsXmlNav.getNavParent() bug?

Nico Krause Nico.Krause at nsc.eu.com
Thu Nov 7 15:57:53 CET 2002


Martin,

yes - I remembered also some miracles within the surroundings you stated.
At the end it worked for me. Remember it was build for a special need in a
special company. So I don't care about bugs, if it works for me pretty good.

But have a look over my structure - it looks like:

/site_root/home/index.html (- the index.html) normally you need no special
folder for it.  So "Home" is a item within the primary navigation 

/site_root/products/product1.html  
/site_root/products/product2.html
/site_root/products/product3.html

"Products" is also within the primary navigation and each product is drawn
within secondary navigation.

I only need a deep of 2 levels. So I used following method 
<method name="getNavRoot">2,2</method>
which means extract only 2 levels (number after comma) starting within the
second level. (number before comma) - try it.

As I unofficially heard (*pssst!*) - A better or debugged or re-implemented
Nav - function will be included within the next releases - I got already a
sample.
But did'nt tested it yet. 

Hoping to give you some information which will help you. Special greetings
too Martin - "the navigation" - Bührle from here :-)

Best Wishes and have also a successful time,

Nico




-----Original Message-----
From: Martin Leja [mailto:Martin.Leja at mpluss.de] 
Sent: Donnerstag, 7. November 2002 15:13
To: opencms-dev at www.opencms.org
Subject: [opencms-dev] CmsXmlNav.getNavParent() bug?

hi,

my vfs looks like this:
/site_folder/folder_a/file_a.html
/site_folder/folder_a/file_b.html
/site_folder/folder_b/file_a.html
/site_folder/folder_b/file_b.html
...

all html files should include a navigation element so that the following nav
is displayed
<nav text of folder_a and link to index file>  |  <nav text of folder_b and
link to index file>  | ...

i thought that the a "<method name="getNavParent">1</method>" would be the
right method to use here, but it gives me the navigation of the root "/",
i.e.
Background  |   Projects  |   Service  |   Homepage
because i have the opencms homepage imported. This is an bug isn't it?

I get the desired result with "<method name="getNavRoot">2</method>", but
would rather use the above getNavParent because this method acts relative to
the path of the current file whereas getNavRoot proceeds in an absolute way
starting from the root folder. Therefore getNavParent will still work if i
move the folder "site_folder" to another location.

--
Regards, martin.leja at mpluss.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20021107/c8adc2ca/attachment.htm>


More information about the opencms-dev mailing list