make the breadcrumbs show my full path?

Brandon Oliver's Avatar

Brandon Oliver

28 Jun, 2012 10:29 PM

We discussed this with the breadcrumbs, but it's actually missing a piece. I want it to show Base Folder > Name of Folder > Name of Page. Look at the example here. I want it to refer to the index.html of my BASE FOLDER, then to SCHOLARSHIPS folder (which links to the index.html of that folder), then TYPES OF SCHOLARSHIPS. RIght now, for the breadcrumb, as you can see it just says "Types of Scholarships."

An image is attached as well as the xslt for the format.

  1. 2 Posted by Lee Roberson (Northwestern U) on 29 Jun, 2012 01:06 AM

    Lee Roberson (Northwestern U)'s Avatar

    Brandon,

    Can you attach a screen shot of what the index block being used looks like, from the block's edit screen? The notes for that XSL sheet specifically note that the block needs to be in a particular mode to function properly.

    Also keep in mind that if the 'indexing' checkbox is un-checked for a given page (this checkbox is under the system tab when editing pages), the index block won't exactly be able to properly render all of the content needed to correctly print breadcrumbs. This limitation will apply to pages that reside in folders that are also set to not be indexable.

  2. 3 Posted by Brandon Oliver on 29 Jun, 2012 03:17 PM

    Brandon Oliver's Avatar

    See the attached.

  3. 4 Posted by Lee Roberson (Northwestern U) on 29 Jun, 2012 03:25 PM

    Lee Roberson (Northwestern U)'s Avatar

    Just to satisfy my curiosity, try hitting the red minus sign next to the folder selection (to clear it), then submitting the block and checking the page again.

  4. 5 Posted by Brandon Oliver on 29 Jun, 2012 03:33 PM

    Brandon Oliver's Avatar

    I did that (the red minus sign), and tried it, and it still doesn't do what I want it to do. It started off that way, not having the "/" sign, but the "/" is there because I went in at one point and clicked on my base folder.

  5. 6 Posted by Lee Roberson (Northwestern U) on 29 Jun, 2012 03:36 PM

    Lee Roberson (Northwestern U)'s Avatar

    Maybe it's the skiplevels being set to 1 in the XSL that is causing the problem. If you set it to zero, maybe it gets a little closer?

  6. 7 Posted by Brandon Oliver on 29 Jun, 2012 03:47 PM

    Brandon Oliver's Avatar

    Getting closer! Now it shows the University Communications folder, which is great. Now how can I set it to say "Home" and begin the breadcrumb trail with the index.html page of my base folder.

  7. 8 Posted by Brandon Oliver on 29 Jun, 2012 04:55 PM

    Brandon Oliver's Avatar

    How about this.... since I want the index.html of the base folder to appear on EVERY page as the lead of the breadcrumbs, can I just manually put that shortly before the programmed version? Is that possible?

  8. Support Staff 9 Posted by Ryan Griffith on 29 Jun, 2012 05:38 PM

    Ryan Griffith's Avatar

    Brandon, I think the XSLT is looking at the metadata of the folders when it generates the links for the upper "sections." Have you tried adjusting the Base Folder's metadata to say "Home"? Try Display Name first, it looks like the get-asset-name template uses that value first in the when statement.

  9. 10 Posted by Brandon Oliver on 02 Jul, 2012 01:34 PM

    Brandon Oliver's Avatar

    I tried to insert the link to the University home page manually and it displays, however the breadcrumbs are on a second line. How can I bring it back up to the first line?

    The code is as follows:

    You can see the test page here: http://www.tamusa.tamus.edu/universitycommunications/news/test-of-b...

  10. Support Staff 11 Posted by Ryan Griffith on 02 Jul, 2012 01:39 PM

    Ryan Griffith's Avatar

    Hi Brandon,

    Looking over the HTML that is generated, it looks like the University home link is outside of the UL for the breadcrumbs:

    <div id="breadcrumbs">
    <a href="http://www.tamusa.tamus.edu">University Home </a>
    <ul>
    <li><a href="../index.html">University Communications</a> › </li>
    <li><a href="archives.html">News</a> › </li>
    <li><strong>Display Name</strong></li>
    </ul>
    </div>
    

    You may want to try adjusting your Format so that the HTML it generates is more like:

    <div id="breadcrumbs">
    <ul>
    <li><a href="http://www.tamusa.tamus.edu">University Home </a> › </li>
    <li><a href="../index.html">University Communications</a> › </li>
    <li><a href="archives.html">News</a> › </li>
    <li><strong>Display Name</strong></li>
    </ul>
    </div>
    
  11. 12 Posted by Brandon Oliver on 02 Jul, 2012 01:47 PM

    Brandon Oliver's Avatar

    But doesn't that take away the block we set up?

  12. Support Staff 13 Posted by Ryan Griffith on 02 Jul, 2012 02:11 PM

    Ryan Griffith's Avatar

    The HTML I posted was just a sample, you'll want to update your XSLT Format so that it generates something similar to this HTML.

    To do this, you will probably want to place the static University Homepage link at the beginning of the UL list, before you loop through the links for the breadcrumbs.

  13. 14 Posted by Brandon Oliver on 02 Jul, 2012 04:50 PM

    Brandon Oliver's Avatar

    Seeing as that I'm not well-versed in XSL, how would you translate that HTML into XSL?

  14. Support Staff 15 Posted by Ryan Griffith on 02 Jul, 2012 06:31 PM

    Ryan Griffith's Avatar

    Hi Brandon,

    My apologies, I'd be happy to have a look at your XSLT if you can attach it to this discussion.

    Thanks.

  15. 16 Posted by Brandon Oliver on 02 Jul, 2012 07:49 PM

    Brandon Oliver's Avatar

    Please see the attached.

  16. Support Staff 17 Posted by Ryan Griffith on 02 Jul, 2012 08:21 PM

    Ryan Griffith's Avatar

    Hi Brandon,

    Where did you add the University Home link, was this in the template?

    The attached XSLT should add a static link to the beginning of your breadcrumbs to the University's homepage. You should be able to remove the link you added in during your testing as well.

    Please let me know if this works out.

    Thanks.

  17. 18 Posted by Brandon Oliver on 02 Jul, 2012 08:44 PM

    Brandon Oliver's Avatar

    That worked! Thank you!!!!

  18. Support Staff 19 Posted by Ryan Griffith on 03 Jul, 2012 12:14 PM

    Ryan Griffith's Avatar

    Glad to hear that it worked! I'm going to close this discussion, please feel free to reply or comment to re-open if you have any additional questions.

    Thanks.

  19. Ryan Griffith closed this discussion on 03 Jul, 2012 12:14 PM.

Comments are currently closed for this discussion. You can start a new one.