[opencms-dev] disappearing navigation (get)

Stephan Hartmann hartmann at waehrisch-feykes.de
Wed Feb 27 09:46:34 CET 2002


Hi Manfred,

.......
>
> On the start-page (indexH) all navigation work very fine.
> But on the pages in the subfolders (categoryA for example, indexA) the
> navigation 'nav' and 'navfoot' are disappearing.
> But surprisingly the 'navstatus' navigation work further fine.
> My questions are:
> Do I need a relative url to my navigation file like
> this: '../content/internal/navstatus' or will the absolute
> url work in every case independent from the invocation place?
> What else can happens? Whats going wrong in my files?
>

Urls to template files always have to be absolute from the virtual 
filesystem's root.
in this templates there are calls to methods of the dinfined class 
(com.opencms.defaults.CmsXmlNav) which generate some output. 
getNavTree produces a navigation tree from the root, getNavCurrent a 
Navigation from the current postion of the page that includes the template.
So if you have nothing inside your categoryA folder there is no output for 
this element. 
create a new folder inside and see what happens (Be sure to add navigation 
properties).


> Another problem I have is the disappearing of an image.
> It is the same thing like above I guess. On the page indexH (direct under
> the root)
> I can see the image. But on the pages in the subfolders the image
> disappear. The image tag looks so: <img
> src="pics/images/Computerchips.jpg">. If I try <img
> src="/pics/images/Computerchips.jpg"> the image will be never shown.
> Any ideas?

if you have made your own template, include pics always by calling the 
getServletPath method:

<img src="]]><method 
name="getServletPath"/><![CDATA[pics/images/Computerchips.jpg">


Bye,
Stephan


>
> with kindly regards
> Manfred
>
> ----------------------------------------------
> IFCOS Institut für Zell- und Organsimulation GmbH
> Friedrich-Barnewitz-Strasse 3
> email: manfred.pruntsch at ifcos.com
>
>
> here is the content of the 'navstatus' file:
> <?xml version="1.0"?>
> <XMLTEMPLATE>
> <naventry>
>   <![CDATA[
>   <td> <a href="]]><process>navlink</process><![CDATA[">
>         ]]><process>navtext</process><![CDATA[</a> </td>]]>
> </naventry>
> <navcurrent>
>   <![CDATA[
>   <td> 
>       ]]><process>navtext</process><![CDATA[ </td>]]>
> </navcurrent>
> <TEMPLATE>
>   <![CDATA[
>   <TABLE><tr>
>       <td><font face=arial size=2 color=#8B0000 weight=bold>Here am
> I:</font></td>]]><method name="getNavTree"/><![CDATA[</tr>
>   </TABLE>]]>
> </TEMPLATE>
> </XMLTEMPLATE>
>
>
>
> here is the content of the 'navigation' file:
> <?xml version="1.0"?>
> <XMLTEMPLATE>
> <naventry>
>   <![CDATA[
>   <tr>
>     <td><a href="]]><process>navlink</process><![CDATA[">
>         ]]><process>navtext</process><![CDATA[</a></td>
>   </tr>]]>
> </naventry>
> <navcurrent>
>   <![CDATA[
>   <tr>
>     <td>
>       ]]><process>navtext</process><![CDATA[</td>
>     </tr>]]>
> </navcurrent>
> <TEMPLATE>
>   <![CDATA[
>   <TABLE width="100%" bgcolor=#DEB887>
>     ]]><method name="getNavCurrent"/><![CDATA[
>   </TABLE>
>   ]]>
> </TEMPLATE>
> </XMLTEMPLATE>



More information about the opencms-dev mailing list