Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Connie DeCinko 931 posts 1160 karma points
    May 06, 2011 @ 19:33
    Connie DeCinko
    0

    Truncate or control length of Breadcrumbs

    This is slightly off topic, but many of you perhaps have faced this issue...

    We have a breadcrumb area of our page that only looks decent if kept to a single line of text.  I can truncate individual elements (page title) to keep the length down, but many times it looks pretty ugly.  Either words are cut off or the entire line only takes up half the space since a page high up in the tree is truncated and does not need to be.

    How do you handle breadcrumbs and keep them from growing out of control?

     

  • Eran Meir 401 posts 543 karma points
    May 06, 2011 @ 19:55
    Eran Meir
    0

    i use uComponents function named GetFirstWords
    more info here 
    http://ucomponents.codeplex.com/wikipage?title=Strings&referringTitle=Documentation

  • Rich Green 2246 posts 4008 karma points
    May 06, 2011 @ 20:00
    Rich Green
    0

    Hey Connie,

    I always have a field for 'page title' which can be used to override the actual page name, this allows the client to enter a 'shorter' page name if they need to

    Then when rendering breadcrumbs etc. I check to see if the page title has been filled out if so I display this, otherwise the nodename.

    This means users can control how a page is displayed in breadcrumbs / navigation.

    For example the page name might be "Truncate or Control length of breadcrumbs" but the user could just override this with "breadcrumb lengths" as a page title.

    Rich

     

  • Connie DeCinko 931 posts 1160 karma points
    May 06, 2011 @ 21:44
    Connie DeCinko
    0

    I do something similar, with a separate field used for the breadcrumb.  However, it relies upon the user being smart enough to enter an appropriate length title.  I could possible try limiting the length of that field.  Haven't figure out how to do that in Umbraco yet.

     

  • Mike Chambers 636 posts 1253 karma points c-trib
    May 06, 2011 @ 22:25
    Mike Chambers
    0

    validation on the parameter in your doc type? .{0,100} would limit to 0-100 chars

Please Sign in or register to post replies

Write your reply to:

Draft