[opencms-dev] Strange navigation behaviour

Peter Davie peter.davie at convergentsolutions.com.au
Sat Mar 24 06:36:33 CET 2018


Hi,

I have a navigation file which has the following content:
<?xml version="1.0" encoding="UTF-8"?>

<ApolloNavigations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xsi:noNamespaceSchemaLocation="opencms://system/modules/org.opencms.apo
llo/schemas/navigation.xsd">
  <ApolloNavigation language="en">
    <Title><![CDATA[Services Navigation]]></Title>
    <NavStartLevel><![CDATA[1]]></NavStartLevel>
    <NavDepth><![CDATA[1]]></NavDepth>
    <NavFolder>
      <link type="WEAK">
        <target><![CDATA[/sites/convergentcomms/.content/contentsection
s/cs_00008.xml]]></target>
        <uuid>3f0c365c-106b-11e8-8854-acd1b88d8137</uuid>
      </link>
    </NavFolder>
    <Container>true</Container>
    <PullNavUp>true</PullNavUp>
  </ApolloNavigation>
</ApolloNavigations>


Note the starting folder is point at a content section file!  Whenever
I edit the file, I set the starting folder to the necessary folder
(/Services/) but when I save the file, it always gets set to the above.  I
have deleted, published and re-created the file, but I still get the
same content.  The folder contains three pages:
Services/
  Overview		<-- hidden in the navigation
  Assessment
  Implementation

The Overview and Implementation pages contain the following content
generated by the formatter (unsurprisingly):

<!--
No navigation items found in selected folder!

type="forSite"
currentPageFolder="/Services/services-overview/"
currentPageUri="/Services/services-overview/index.html"
content.value.NavFolder="/.content/contentsections/cs_00008.xml"
navStartFolder="INVALID"
navStartLevel="1"
endLevel="1"
navDepth="1"
locale="en"
 -->

However the formatter run on the Assessment page (somehow) generates
the correct navigation HTML:

    <ul class="sidebar-nav list-group">
    <li class="list-group-item currentpage"><a
href="/Services/assessment/">Assessment</a></li>
<li class="list-group-item"><a
href="/Services/implementation/">Implementation</a></li>
</ul>

I also have the same odd behaviour occurring in the Products navigation,
where the content is:
<?xml version="1.0" encoding="UTF-8"?>

<ApolloNavigations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xsi:noNamespaceSchemaLocation="opencms://system/modules/org.opencms.apo
llo/schemas/navigation.xsd">
  <ApolloNavigation language="en">
    <Title><![CDATA[Products Navigation]]></Title>
    <NavStartLevel><![CDATA[1]]></NavStartLevel>
    <NavFolder>
      <link type="WEAK">
        <target><![CDATA[/sites/convergentsolns/.content/sliders/sl_000
01.xml]]></target>
        <uuid>9f06c3f3-49ad-11e7-b2ee-acd1b88d8137</uuid>
      </link>
    </NavFolder>
    <Container>true</Container>
    <PullNavUp>true</PullNavUp>
  </ApolloNavigation>
</ApolloNavigations>

However all pages in the Products folder display the correct navigation
HTML:
    <ul class="sidebar-nav list-group">
    <li class="list-group-item currentpage"><a
href="/Products/internet/">Internet</a></li>
<li class="list-group-item"><a href="/Products/voice/">Voice</a></li>
<li class="list-group-item"><a href="/Products/cloud/">Cloud</a></li>
<li class="list-group-item"><a href="/Products/mobile/">Mobile</a></li>
</ul>

I have found that I can get around this problem by removing the Start
Folder in the navigation editor but this behaviour is just plain
strange!

Any thoughts?

Regards,
Peter




More information about the opencms-dev mailing list