Here's a basic example:-
In a project that has Navigation Manager properly enabled, add the
following to a base page content class where you want the breadcrumb
to be rendered. Feel free to enclose it in a <div> with your preferred
class info etc:-
<reddot:cms><navigation areaname="Breadcrumb" /></reddot:cms>
...Then create the following Navigation Manager breadcrumb content
class:-
(please note: this is a cut-down version of a working content class -
I think it's OK but it hasn't been tested)
<reddot:cms>
<if>
<query valuea="Context:CurrentIndex.Id" operator="=="
valueb="Context:FirstIndex.Id">
<if>
<query valuea="Context:CurrentIndex.Id" operator="=="
valueb="Context:LastIndex.Id">
<htmltext><%!! Context:CurrentIndex.Headline !!%></htmltext>
</query>
<query type="else">
<htmltext><a href="<%!! Context:CurrentIndex.GetUrl() !!%>"><%!!
Context:CurrentIndex.Headline !!%></a>
<navigation:nextlevel>
</htmltext>
</query>
</if>
</query>
<query type="else">
<if>
<query valuea="Context:CurrentIndex.Id" operator="=="
valueb="Context:LastIndex.Id">
<htmltext><%!! Context:CurrentIndex.Headline !!%></htmltext>
</query>
<query type="else">
<htmltext>| <a href="<%!! Context:CurrentIndex.GetUrl() !!%>"><
%!! Context:CurrentIndex.Headline !!%></a>
<navigation:nextlevel>
</htmltext>
</query>
</if>
</query>
</if>
</reddot:cms>
Here's a brief description about what it does (apologies if I am
stating the obvious):-
There are essentially two main queries, each with two sub-queries
Main Query 1
--------------------
1. The FIRST query tests to see if the current navigation index is
also the FIRST index (which is normally the home page). If a match is
found, we know that the current navigation index is the home page.
But...is that ALSO the CURRENT page index? That's what the sub-query
checks by looking at the LastIndex.Id value. If this returns a match
then we know that we are currently viewing the Home Page (in other
words Home page index <==> first index <==> last index). And if we are
on the home page, then we only display the page headline as text
(there's no point creating a link to go back to the same page).
Alternatively, if we have a match for the FirstIndex.Id but NOT for
LastIndex.Id then we are NOT viewing the home page, but the Home page
index has been hit. So we have to create an initial link for the home
page. And because the home page link is always displayed first, we
don't output a pipe (|) leader. Then we issue a <navigation:nextlevel>
call to continue the loop.
Main Query 2
--------------------
2. This query gets run for every navigation index EXCEPT the home page
(which is handled by Main Query 1). The sub query checks to see if the
current navigation index is equal to: LastIndex.Id (the index of the
current page). If there is a match, then only the page headline is
rendered (as text).
Alternatively, if there is no match, then a pipe separator "|" is
rendered, followed by the current navigation index as a link. Then we
issue a <navigation:nextlevel> call to continue the loop.
In all cases the link text that is returned is the page headline.
Next, in SmartTree go to: Start->Browse Navigation->Project and then
click: Navigation Areas in the action menu.
In the pop-up Nav Man dialog, right-click the "Navigation Areas" link
in the left-hand window pane and select: "Create Area" from the popup
menu. In the Name field enter: Breadcrumb and enter a meaningful
description in the: Description field - then click [OK]
Locate your newly created content class in the right-hand pane, then
drag/drop it onto your new "Breadcrumb" navigation area in the left
pane. Finally set the properties of the newly dragged class to:
* All Levels
* Selected
Click [OK] and then close the Nav Man dialog.
You should now have a basic working breadcrumb.
Hope that helps
On Feb 26, 1:53 pm, Gareth <[email protected]> wrote:
> Hello everyone,
>
> I have found quiet a few posts and articles stating that navigation
> manager is easy to use for creating breadcrumbing but I cant find any
> examples of how to do it? Does anyone have a code example of how the
> breadcrumb is implemented with navigation manager please?
>
> Any help would be greatly appreciated!
>
> Many thanks,
>
> Gareth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/RedDot-CMS-Users?hl=en
-~----------~----~----~----~------~----~------~--~---