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?
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.
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.
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?
i use uComponents function named GetFirstWords
more info here http://ucomponents.codeplex.com/wikipage?title=Strings&referringTitle=Documentation
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
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.
validation on the parameter in your doc type? .{0,100} would limit to 0-100 chars
is working on a reply...