ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Autocrumb - Lightweight Breadcrumb Helper (ver.12.05.1)

December 09, 2009 5:58pm

Subscribe [78]
  • #61 / May 01, 2010 10:15am

    ardinotow

    162 posts

    @ElToro,
    Great! Can’t wait to see your work :cheese:

  • #62 / May 04, 2010 1:45pm

    ardinotow

    162 posts

    I reviewed ElToro’s solution. It works but found a bug when unlink last segment set to TRUE.
    So, I decided to make new version based on ElToro’s ideas and here is, just uploaded an hours ago, new autocrumb helper version 5.10.1 in this link.

    ** AutoCRUMB (Breadcrumb Helper) 5.10.1 **

    New features:
    1. Change breadcrumb’s url link.
    2. Create new crumbs set.
    Notes: please read breadcrumb config file for more information and example.

    Enjoy,
    Ardinoto

    Important!
    Please do backup before replacing new breadcrumb config file.

  • #63 / May 06, 2010 1:00pm

    miano

    3 posts

    This is fantastic and worked perfectly!  Great customization options - fit my need perfectly.  Thank you for sharing and your work.  😊

  • #64 / May 06, 2010 5:16pm

    miano

    3 posts

    I have a suggestion:

    So I wanted to add an html arrow between the links so it looks like:

    Home -> Page1 -> Page2

    So in config wrapper I added:

    
    
    

    But it adds the html arrow even to the last breadcrumb segment.  So you get:

    Home ->

    and

    Home -> Page1 ->

    Perhaps if you added a config[‘wrapper_arrow’] that will insert that code only IF there is more than one segment AND it is not the last segment.

    So essentially I can code:

    
    
    

    and get

    Home -> Page1 -> Page2

  • #65 / May 06, 2010 11:45pm

    ardinotow

    162 posts

    @miano,
    You can change delimiter configuration to:

    $config['delimiter'] = " → ";

    Your wrapper configuration should be:

    
    									
  • #66 / May 07, 2010 11:01am

    miano

    3 posts

    So thaaaat’s what the delimiter is for.  LOL thanks dude.

  • #67 / May 08, 2010 9:46pm

    Benjo

    6 posts

    I’ve been using Code Igniter for a few months as I transition from coldfusion to PHP.

    I have a test application I would like to implement breadcrumbs on. I’ve looked at a few options and I think autoCrumb will satisfy my taste. So, I’ve downloaded version 5.10.1 and have an issue with the links.

    My home page using CI is at ‘http://localhost/PHC/home’ (where home is a controller and not a folder). Using the documentation provided with autoCrumb 5.10.1, I have the following setting: $config[‘exclude’] = array(‘home’,‘logout’); . Everything else is set to the defaults.

    As a result, the breadcrumb on my home page is ‘Home’, but the URL is ‘http://localhost/PHC/’ which of course leads to a ‘404 Page Not Found’ error.

    I’ve tried different things with the ‘Change URL’ feature with no luck. Does anyone have any suggestions?

    Thanks,
    Benjo

  • #68 / May 09, 2010 12:15pm

    ardinotow

    162 posts

    @Benjo,
    I’ll try to help you.
    First find these code

    // Begin writing breadcrumb string
    $init_link = $CI->config->item('set_home');
    $str = $wrapper[0].$wrapper_inline[0].anchor('', $init_link).$wrapper_inline[1];

    Change the last line from code above to:

    $str = $wrapper[0].$wrapper_inline[0].anchor('home', $init_link).$wrapper_inline[1];

    That’s it.
    By default “Home” url is the same as $config[‘base_url’] where located on application/config/config.php so if you change anchor link to ‘home’ instead of ‘’ then hopefully your home page will go to http://localhost/PHC/home

  • #69 / May 09, 2010 5:37pm

    Benjo

    6 posts

    Ardinotow,

    Thank you so much! Your suggestion worked like a charm.

    This may be a candidate for the ‘Config: Replacer’ section of ‘breadcrumb.php’.

    Before posting my question here, I believe I tried setting $config[‘base_url’] (located in ‘application/config/config.php’ to ‘http://localhost/PHC/home’ and it didn’t work.

    Benjo

  • #70 / May 18, 2010 6:42am

    stikoo

    5 posts

    Hi There,

    I’ve give this plug-in a go but I’m not sure if it’s capable of doing what I need, I’m a designer stroke wannabe developer, so I don’t know a ton of dev stuff :(

    basically my url is like the following:

    http://www.somesite.co.uk/index.php/site/products/2

    Ideally I want the breadcrumb to read:
    Home // Anchor Fittings

    this would mean removing the end number, didn’t see a way to do this in the config file, it would also mean I’d have to read the end number sector from the url (which I know how to do) and pull info from the database to determine the category name which would then have to replace the products sector.

    Can this plugin do that or have I built my website fundamentally wrong in the first place?, On reflection I would rather see my urls looking like:

    http://www.somesite.co.uk/index.php/site/anchor-fittings/

    I only know how to use the id number of a product as reference though :(

    Any help and tips gratefully received!

    Alastair

  • #71 / May 18, 2010 2:13pm

    Benjo

    6 posts

    Hello there,

    Assuming you have your ‘Home’ at ‘http://www.somesite.co.uk/index.php/’, try these lines of code in your breadcrumb.php…

    $config[‘replacer’] = array(‘2’ => ‘Anchor Fittings’);

    $config[‘exclude’] = array(‘site’,‘products’);

  • #72 / May 20, 2010 6:43am

    stikoo

    5 posts

    Hi Benjo

    That theory works in only one instance really, because the number 2, and “anchor fittings” are dynamic values, it would be impossible for me to keep the breadcrumb config file updates with the new values for the other categories.

    for some reason the first snippet you supplied didn’t work either, not sure why.

    Anyone else got ideas?

  • #73 / May 20, 2010 10:43am

    Benjo

    6 posts

    Hi Ali,

    Since the number 2 and ‘anchor fittings’ are dynamic, I suggest something else:

    1- figure out a way to add ‘anchor fittings’ to your url; it should look something like ‘.../site/products  
      /2/anchor fittings’
    2- then edit your config file with $config[‘exclude_segment’] = array(1, 2, 3); that should hide ‘/site
      /products/2’
    3- I believe your breadcrumb will be what you’re looking for after the above 2 steps.

    All the best!

    Benjo

  • #74 / May 20, 2010 1:09pm

    chefnelone

    157 posts

    Hello

    This is a great helper!

    I’ve found this:

    If the last segmente is a number, then:

    $config['hide_number'] = TRUE;

    doesn’t work.

    http://192.00.00/simetria/tienda/34/Colecciones/228
    produce: Home > Tienda > Colecciones > 228

    It worked fine with the 3rd segment /34/ but no with the last one /228/

    Edited:
    Sorry I just saw the note line:
    * Notes: If the last segment is a number then it always shown whether this config
    Is there a way to change this?

  • #75 / May 20, 2010 10:11pm

    ardinotow

    162 posts

    Hi chefnelone,

    To show number at last segment of URL you can try this:
    First, find these code:

    if (preg_match("/^[0-9]/", $value) AND ! preg_match("/[a-zA-Z]+/", $value) AND $key != $show_last_number)

    Second step, remove last condition, so now you have this code in “if” statement:

    if (preg_match("/^[0-9]/", $value) AND ! preg_match("/[a-zA-Z]+/", $value))

    I haven’t test it yet, but I think that will work.


    Ardinoto W.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases