Create a breadcrumb in RedDot CMS with render tags and hide it in your project by using a query

Sharon from the Google Grous “RedDot CMS” asked me, how to hide your breadcrumb (or any other element) on a page (e.g. the “home” of your website). So here’s a short description using render tags and a simple query for creating a XHTML-valid breadcrumb navigation:

XML:
  1. <reddot:cms>
  2. <if>
  3.  <query valuea="<%inf_pageGUID%>" operator="!=" valueb="String:123CDDB..">
  4.   <htmltext><ul id="breadcrumb"></htmltext>
  5.   <foreach itemname="item" object="Context:CurrentIndex.GetPathArray()">
  6.    <htmltext><li><a href="</htmltext>
  7.    <output type="object" object="Store:item.GetUrl()" />
  8.    <htmltext>"></htmltext>
  9.    <output type="object" object="Store:item.Headline" />
  10.    <htmltext></a></li></htmltext>
  11.   </foreach>
  12.   <htmltext></ul></htmltext>
  13.  </query>
  14. </if>
  15. </reddot:cms>

Creating a simple -query with requesting the page GUID. Note that the render tag CurrentPage.Id which is described inside the manual means the navigationGUID inside of the Navigation Manager NOT the value of the info-element for the pageGUID!
And if you want to have it more flexible, replace the

XML:
  1. "String:123CDDB7F7CC4717BBB14AE82F206A2F"

part with a standardfield text element, where you can enter the GUID in your template content elements.

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4 out of 5)
Loading ... Loading ...

6 Reaktionen zu “Create a breadcrumb in RedDot CMS with render tags and hide it in your project by using a query”

  1. Thinkmobil

    this does NOT work in my project !!!
    I use the navigation manager, which works fine for the navigation and a sitemap

    and I can delete, because it’s only to
    switch of the crumb on a certain page, the homepage, correct?

    also does not work in my project

    I stop thinking

    anyhow terrific blog, Markus

  2. Markus Giesen

    Hey Martin, thank you for the compliments,
    due the normal wordpress code rewriting, the quotes where wrong in my example. Please try it with the new one above. If this even won’t work please send me your Template or the code snippet and I will have a look on it.

    Otherwise I am sure, that this is a defect and it will be solved in HotFix 25, coming in Januar 2010 ;o)

  3. thinkmobil

    meine code Blöcke hat das System geschluckt?!, der text gibt so wenig Sinn…

  4. Thinkmobil

    juhu, now the breadcrumb works with rendertags!
    thanx

  5. PKI

    would it be possible to have an language-variant comprehensive result for this breadcrumb?

    i use such breadcrumbs for a pixel-counter-tracking-code for our marketing department. this should display in every language-variant the headline-element of the english version. because the website has also chinese variant and should get an russian, but the markting-dept speaks only english.

    i tried to use IDs only, but that wouldn’t satisfy these marketeers.

    gute zeit, da auf der anderen seite der welt ;D

    -Jonas

  6. Markus Giesen

    Hey Jonas,
    You want the English title of the tracked site even if you are in the chinese or russian language?
    Hmmm. I can’t think about a rendertag solution here, given that there is always an english site as source-language I would use RQL to update a standardfield element with the title of the in the english language variant and make this element value language variant independent
    OR
    directly fetch the title from the english page via RQL and return it to each page.
    As it is just a reading process it should not take up too much performance if it does I would try the first approach to have a kind of caching mechanism.

    If you need more details you know where to find me!

    And I hope you are doing well up there on the north of this blue planet with all it’s RedDots… ;D