Need breadcrumbs to display home
-
- Sr. Propeller Head
- Posts: 110
- Joined: Mon Jul 12, 2010 9:55 pm
- Location: Palmerston North, New Zealand
Need breadcrumbs to display home
Hi,
I have successfully added a breadcrumbs proxy to my Webhelp and that all works fine. One question though. My linked project looks very similar to the examples that you see in the Flare Help topic about breadcrumbs where I have a Welcome page thats all by itself. How do I get that page to always show as "Home" on the breadcrumbs? When you select the "Home" button on webhelp it goes back to that page correctly as that is the page that I set as the opening page.
But in breadcrumbs each one only goes back as far as the book that its part of. If that makes sense. So when you select one of the books the "you are here" bit starts with the title of that book. I'd like them all to start with "Home". Is it something to do with the welcome page not being the top of the TOC? Do I have to make that the top book and everything else is a subset of that?
I have successfully added a breadcrumbs proxy to my Webhelp and that all works fine. One question though. My linked project looks very similar to the examples that you see in the Flare Help topic about breadcrumbs where I have a Welcome page thats all by itself. How do I get that page to always show as "Home" on the breadcrumbs? When you select the "Home" button on webhelp it goes back to that page correctly as that is the page that I set as the opening page.
But in breadcrumbs each one only goes back as far as the book that its part of. If that makes sense. So when you select one of the books the "you are here" bit starts with the title of that book. I'd like them all to start with "Home". Is it something to do with the welcome page not being the top of the TOC? Do I have to make that the top book and everything else is a subset of that?
Carp diem - Seize the fish
-
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Need breadcrumbs to display home
The only idea I have is to add a static Home link in front of the breadcrumbs proxy. That will only look right when you can edit the proxy properties to not include the "You are here:" text, but rather add that manually as static text in front of your home link. So it will basically be:
You are here: <home link> > [modified breadcrumbs proxy]
You are here: <home link> > [modified breadcrumbs proxy]
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Need breadcrumbs to display home
Yes, to get it working (without any workarounds), you'd need your home page topic as a single book at the root of your TOC.Steveman wrote:Is it something to do with the welcome page not being the top of the TOC? Do I have to make that the top book and everything else is a subset of that?
I personally find that looks a bit funny in the Contents pane (as you don't initially see anything), but on the other hand it does mean you can navigate around your help fully using the breadcrumbs (and mini-TOCs).
Re: Need breadcrumbs to display home
Or you could create a second masterpage that doesn't have a breadcrumb proxy and apply that masterpage just to the welcome page and all other topics use the other masterpage that has the real breadcrumb proxy. So your welcome page doesn't have any breadcrumb at all and all others do. I did that because having just the word "Home" by itself looked a bit weird to me, especially since it wasn't a link, so I removed the breadcrumb from the welcome page altogether.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
- Sr. Propeller Head
- Posts: 110
- Joined: Mon Jul 12, 2010 9:55 pm
- Location: Palmerston North, New Zealand
Re: Need breadcrumbs to display home
This is probably a dumb question but how do you apply a second masterpage to a topic for online content? Or rather, I know how to do a second masterpage, I'm just not sure where you apply it to the topic. I've only managed to apply it for a target but not sure where it is for a single topic.
Carp diem - Seize the fish
Re: Need breadcrumbs to display home
See this KB article -- http://kb.madcapsoftware.com/default_CSH.htm#FMP1001F
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
- Sr. Propeller Head
- Posts: 212
- Joined: Wed Apr 04, 2007 11:50 am
Re: Need breadcrumbs to display home
Resurrecting this thread.
Here is what the code looks like in the master page:
And here's what it looks like in the output:
In addition to the line separation, there is the issue of styling, since our links are styled differently from the breadcrumbs. I suppose for that I'd need to create a special class of link styling, no?
Thanks for any help.
I tried this, but it seems to put the "Home" link on a separate line from the breadcrumbs proxy.RamonS wrote:The only idea I have is to add a static Home link in front of the breadcrumbs proxy. That will only look right when you can edit the proxy properties to not include the "You are here:" text, but rather add that manually as static text in front of your home link. So it will basically be:
You are here: <home link> > [modified breadcrumbs proxy]
Here is what the code looks like in the master page:
Code: Select all
<div class="content">
<div id="contentBody">
<div class="row collapse">
<div class="sideContent">
<div class="clearfix">
<MadCap:topicToolbarProxy />
</div>
<!--<MadCap:menuProxy style="mc-context-sensitive: True;" data-mc-skin="/Project/Skins/SideMenu.flskn" />-->
</div><a href="KB_Home.htm">Home</a> > <MadCap:breadcrumbsProxy /><MadCap:bodyProxy />
</div>
</div>
</div>
In addition to the line separation, there is the issue of styling, since our links are styled differently from the breadcrumbs. I suppose for that I'd need to create a special class of link styling, no?
Thanks for any help.
You do not have the required permissions to view the files attached to this post.
Re: Need breadcrumbs to display home
You can do this fairly simply using a short script.
This is an example of a master page:
* The link to the home topic is inside a span tag with an ID of 'home-link' (#home-link).
* A jQuery script uses prependTo to move the link (#home-link) inside the breadcrumbs container (div.MCBreadcrumbsBox_0) in the output.
This is an example of a master page:
* The link to the home topic is inside a span tag with an ID of 'home-link' (#home-link).
* A jQuery script uses prependTo to move the link (#home-link) inside the breadcrumbs container (div.MCBreadcrumbsBox_0) in the output.
Code: Select all
<body><span id="home-link"><a href="KB_Home.htm">Home</a> > </span>
<MadCap:breadcrumbsProxy />
<MadCap:bodyProxy />
<script type="text/javascript">/*<![CDATA[*/$("#home-link").prependTo("div.MCBreadcrumbsBox_0");/*]]>*/</script>
</body>
-
- Sr. Propeller Head
- Posts: 212
- Joined: Wed Apr 04, 2007 11:50 am
Re: Need breadcrumbs to display home
Thanks, Dave, that worked! The one thing I had to do to make the hyperlink styles match was to add the MCBreadcrumbsLink class to the anchor tag:
I don't profess to know javascript in partiuclar, but even if I knew that there was a prependTo function, how do you know that there is a "div.MCBreadcrumbBox_0" to which to prepend your anchor object? Do you have to look at the Madcap generated code to figure that out?
Thanks again.
Code: Select all
<span id="home-link"><a class="MCBreadcrumbsLink" href="../../KB/KB_Home.htm">Home</a> > </span>
<MadCap:breadcrumbsProxy />
<MadCap:bodyProxy />
<script type="text/javascript">/*<![CDATA[*/$("#home-link").prependTo("div.MCBreadcrumbsBox_0");/*]]>*/</script>
Thanks again.
Re: Need breadcrumbs to display home
Yes, I had to look at the HTML of the generated output. I'm guessing you did too, to figure out there was a 'MCBreadcrumbsLink' class.Rona Kwestel wrote:I don't profess to know javascript in partiuclar, but even if I knew that there was a prependTo function, how do you know that there is a "div.MCBreadcrumbBox_0" to which to prepend your anchor object? Do you have to look at the Madcap generated code to figure that out?
-
- Sr. Propeller Head
- Posts: 212
- Joined: Wed Apr 04, 2007 11:50 am
Re: Need breadcrumbs to display home
Thanks, Dave, that's what I figured. I would certainly prefer a more straightforward way to achieve this, but at least it works.
Actually, the MCBreadcrumbsLink class is in the style sheet:
And pardon my "peucliar" misspelling of particular.
Actually, the MCBreadcrumbsLink class is in the style sheet:
Code: Select all
a.MCBreadcrumbsLink
{
color: #696969;
font-style: italic;
text-decoration: underline;
}
Re: Need breadcrumbs to display home
It's not in your source stylesheet by default; so if it is, then someone must have added it there.Rona Kwestel wrote:Actually, the MCBreadcrumbsLink class is in the style sheet:
-
- Sr. Propeller Head
- Posts: 212
- Joined: Wed Apr 04, 2007 11:50 am
Re: Need breadcrumbs to display home
Well, the only someone on this project, currently, is me, so I must have added it, but perhaps indirectly by editing those settings in the Stylesheet Editor at some point. Otherwise, I normally just edit the stylesheet in the Internal Text Editor.
Re: Need breadcrumbs to display home
I have just tried Dave's solution to prepend text to the the breadcrumbs container and it has worked incredibly well. But I've run into and issue where the breadcrumb text is also added to the Search Results page and any other pages that don't have breadcrumbs. This isn't a huge deal for pages that aren't in the TOC and thus normally show no breadcrumb trail, but I don't want the home link to display on the Search page.Dave Lee wrote:You can do this fairly simply using a short script.
This is an example of a master page:
* The link to the home topic is inside a span tag with an ID of 'home-link' (#home-link).
* A jQuery script uses prependTo to move the link (#home-link) inside the breadcrumbs container (div.MCBreadcrumbsBox_0) in the output.
Code: Select all
<body><span id="home-link"><a href="KB_Home.htm">Home</a> > </span> <MadCap:breadcrumbsProxy /> <MadCap:bodyProxy /> <script type="text/javascript">/*<![CDATA[*/$("#home-link").prependTo("div.MCBreadcrumbsBox_0");/*]]>*/</script> </body>
Is there any way to prevent this from happening? The only way that I can think of is to have the default master page not include the prepended text and apply a separate master page with the prepended text to every topic page in the project (which is not a very workable solution).
EDIT
I found that if I create a span class (span.NoShow) and then directly open the MainStyles stylesheet and add an html.templateTopic span.NoShow with display set to none, that will solve the issue. The text prepended to the breadcrumbs will NOT show on the search page, but will still show on pages that aren't in the TOC.
Re: Need breadcrumbs to display home
If it's just the search page that you don't want breadcrumbs on, you could create your own search topic (i.e. a topic with search results proxy), and set that to use a different master page without the breadcrumbs. The rest of your help can use the default master page with breadcrumbs.