Change the breadcrumbs separator

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 8, 2013   (RSS)

By aev - December 4, 2013

Hi,

is it possible to change the breadcrumbs separator from ":" to another character?

-aev-

By Dave - December 8, 2013

Hi aev, 

A very simple way would be to just split on : and then print out the crumbs individually.  Such as: 

  $str = "hello : world : there";
  foreach (preg_split("/\s*:\s*/", $str) as $fragment) {
    print " -- <a href='?go=$fragment'>$fragment</a> ---";
  }
  exit;

But for creating our own more advanced custom breadcrumbs you can actually just call getCategories() again with this option: 

'categoryFormat'        => 'showall', // options: showall, onelevel, twolevel, breadcrumb

And it will output just the category nodes that make up the breakcrumb.  You can call showme($categoryRecords) on the result to see the fields it makes available.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com