Extra divider in breadcrumb at third level down


(Jmw1d09) #1

On my site when I navigate to pages at the third level down an extra divider appears in the breadcrumb, in front of the name of the parent asset of the page that I am on. I have been through the designs and cant see why this should be happening.

 

An example of it in action can be seen on the page linked below:

 

http://www.themedcalls.nihr.ac.uk/amr/resources/specification-document/possible-research

 

Any ideas would be appreciated


(Charlotte Westney) #2

Hi there,

 

Bit of guess without seeing the design code, but have you double checked your design file code for the 'prefix with divider' and 'suffix with divider' settings for each level? My guess would be that one level has them both set to 'true', so you're getting the divider before and after an element, where the other levels just have it on one.

 

Post up your design file code for the breadcrumb and hopefully someone will be able to spot what's wrong!

Cheers,
Charlie.


(Jmw1d09) #3

Many thanks Charlie.

 

The code from the design file for the breadcrumb is as follows:

 

 <div id="breadcrumb">    <span>You are here: </span>
   <MySource_AREA id_name="breadcrumb" design_area="asset_lineage">
   <MySource_SET name="prefix_with_divider" value="false" />
   <MySource_SET name="suffix_with_divider" value="false" />
   <MySource_SET name="prefix_with_home_link" value="false" />
   <MySource_SET name="suffix_with_current_link" value="false" />
   <MySource_SET name="show_hidden_links" value="false" />
   <MySource_DIVIDER><span class="raquo"> &raquo; </span></MySource_DIVIDER>
 
   <a href="<MySource_PRINT id_name="__global__" var="site_link" full_url="true" />">Home</a>
   <MySource_ASSET>
   <span class="raquo"> &raquo; </span><a href="<MySource_PRINT var="asset_link"/>"><MySource_PRINT var="asset_short_name" /></a>
   </MySource_ASSET>
   <span class="raquo"> &raquo; </span><span class="current"><MySource_PRINT id_name="__global__" var="asset_short_name" /></span>
 
   </MySource_AREA>
   </div>


(Charlotte Westney) #4

Hi there,

 

Ok, I think I can see the problem. You're trying to put the divider in 'manually' as part of the MySource_ASSET print out, and then again after the whole list for the very last asset.

 

If you let Matrix out the divider for you, it should work out as you want it. So the code becomes:

You are here: » ">Home ">

So Matrix should output your manual 'home' link, and then if there are any other pages in the breadcrumb list it will prefix and suffix them with your divider, which you've set as <span class="raquo"> &raquo; </span>, but it won't double up between items. You'll then have a divider at the end of your list, but you then manually put a link to the current page after that. So you end up with a list with Home at the beginning, current page at the end, and one divider between any pages in the middle.

 

Give that a go and see if it works out ok. It matches the settings on my breadcrumbs now, and they come out ok.

Thanks, Charlie.


(Jmw1d09) #5

Hi Charlie

 

That's great and works perfectly.

 

Thanks for taking the time to look at this.

 

John


(Charlotte Westney) #6

Yay! Glad to help ;-)