Left menu validation issue

Hi,

 

I've basically got an issue where when in a second level navigation, it doesn't validate properly and closes the level 1 list item, where it should stay open for the second level.

 

this code here validates:

<div id="sidebarL">
	<ul class="lev1">
		<li class="i0 e1 hilite first parent"><a href="#">Topic Home</a>            		
			<ul>
				<li class="i1 e1"><a href="#" class="hier">Topic Links 1</a>                 		
					<ul>
						<li class="i2 e1"><a href="#" class="">Link 1 / Level 2</a></li>
						<li class="i2 e1"><a href="#" class="">Link 1 / Level 2</a></li>                      		
						<li class="i2 e1"><a href="#" class="">Link 1 / Level 2</a></li>
							<li class="i2 e1"><a href="#" class="hier">Link 1 / Level 2</a>                   		
							<ul>
							<li class="i3 e1"><a href="#" class="">Link 1 / Level 3</a></li>
							<li class="i3 e1"><a href="#" class="">Link 1 / Level 3</a></li>
							<li class="i3 e1"><a href="#" class="selected">Link 1 / Level 3 (Selected)</a></li>
							<li class="i3 e1"><a href="#" class="">Link 1 / Level 3</a></li>
							<li class="i3 e1"><a href="#" class="">Link 1 / Level 3</a></li>
							<li class="i3 e1"><a href="#" class="">Link 1 / Level 3</a></li>
						</ul>                    
						</li>
					<li class="i2 e1"><a href="#" class="">Link 1 / Level 2</a></li>
					<li class="i2 e1"><a href="#" class="">Link 1 / Level 2</a></li>
					</ul>
				</li>
				<li class="i1 e1"><a href="#" class="">Topic Link 2</a></li>
				<li class="i1 e1"><a href="#" class="">Topic Link 3</a></li>
				<li class="i1 e1"><a href="#" class="">Topic Link 4</a></li>
			</ul>
		</li>
	</ul>
</div>

 

 

But converting it to Matrix this one here doesn't:

 

<ul class="lev1">
          <MySource_AREA id_name="topic_home" design_area="asset_lineage">
              <MySource_SET name="levels_to_print" value="1" />
              <MySource_SET name="start_at_level" value="1" />
              <MySource_SET name="prefix_with_home_link" value="false" />
              <MySource_SET name="suffix_with_current_link" value="false" />
              <MySource_SET name="prefix_with_divider" value="false" />
              <MySource_SET name="suffix_with_divider" value="false" />
              <MySource_SET name="show_hidden_links" value="false" />
              <MySource_ASSET>
              <li class="i0 e1 hilite first parent"><a href="<MySource_PRINT var="asset_href" />">Topic Home</a></li>
              </MySource_ASSET>
              <MySource_DIVIDER></MySource_DIVIDER>
          </MySource_AREA>
       &lt;MySource_AREA id_name="left_menu" design_area="menu_normal"&gt;
       &lt;MySource_SET name="settings.class.normal" value="" /&gt;
       &lt;MySource_SET name="settings.class.current" value="selected" /&gt;
       &lt;MySource_SET name="settings.class.hierarchy" value="hier" /&gt;
       &lt;MySource_ASSET&gt;
          &lt;MySource_SUB design_area="menu_normal"&gt;
          &lt;MySource_SET name="settings.class.normal" value="" /&gt;
          &lt;MySource_SET name="settings.class.current" value="selected" /&gt;
          &lt;MySource_SET name="settings.class.hierarchy" value="hier" /&gt;
          &lt;MySource_SET name="show_subs" value="on_current" /&gt;
             &lt;MySource_ASSET&gt;
             &lt;li class="i1 e1"&gt;&lt;a href="&lt;MySource_PRINT var="asset_link"/&gt;" class="&lt;MySource_PRINT var="settings.class" /&gt;"&gt;&lt;MySource_PRINT var="asset_short_name"/&gt;&lt;/a&gt;
             &lt;MySource_SUB design_area="menu_normal"&gt;
             &lt;MySource_SET name="settings.class.normal" value="" /&gt;
             &lt;MySource_SET name="settings.class.current" value="selected" /&gt;
             &lt;MySource_SET name="settings.class.hierarchy" value="hier" /&gt;
                &lt;ul&gt;
                  &lt;MySource_ASSET&gt;
                  &lt;li class="i2 e1"&gt;&lt;a href="&lt;MySource_PRINT var="asset_link" /&gt;" class="&lt;MySource_PRINT var="settings.class" /&gt;"&gt;&lt;MySource_PRINT var="asset_short_name"/&gt;&lt;/a&gt;
                  &lt;MySource_SUB design_area="menu_normal"&gt;
                  &lt;MySource_SET name="settings.class.normal" value="" /&gt;
                  &lt;MySource_SET name="settings.class.current" value="selected" /&gt;
                  &lt;MySource_SET name="settings.class.hierarchy" value="hier" /&gt;
                  &lt;ul&gt;
                    &lt;MySource_ASSET&gt;
                    &lt;li class="i3 e1"&gt;&lt;a href="&lt;MySource_PRINT var="asset_link" /&gt;" class="&lt;MySource_PRINT var="settings.class" /&gt;"&gt;&lt;MySource_PRINT var="asset_short_name"/&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;/MySource_ASSET&gt;
                  &lt;/ul&gt;
                  &lt;/MySource_SUB&gt;
                &lt;/li&gt;
                  &lt;/MySource_ASSET&gt;
                &lt;/ul&gt;
            &lt;/MySource_SUB&gt;
            &lt;/MySource_ASSET&gt;
        &lt;/MySource_SUB&gt;
       &lt;/MySource_ASSET&gt;
       &lt;MySource_DIVIDER&gt;&lt;/MySource_Divider&gt;
       &lt;/li&gt;
       &lt;/MySource_AREA&gt;
     &lt;/ul&gt;
  &lt;/div&gt;

So if i close the first level 

<li class="i1 e1"><a href="<MySource_PRINT var="asset_link"/>" class="<MySource_PRINT var="settings.class" />"><MySource_PRINT var="asset_short_name"/></a></li>

 

It doesn't validate. 

 

If I leave it open and close (/li) the second menu 

<li class="i2 e1"><a href="<MySource_PRINT var="asset_link" />" class="<MySource_PRINT var="settings.class" />"><MySource_PRINT var="asset_short_name"/></a></li>

 

Then I have a problem with all the level 1 list items not been closed (/li) correctly. And so the flow on effect with the 3rd level menu will happen. 

 

Hope this makes sense.

all good. found the issue to be 

  • ">Topic Home
  •  

     not needed to be extended in the list as it wasn't in hierarchy of the menu structure.