Welcome Guest, Not a member yet? Register   Sign In
Autocrumb - Lightweight Breadcrumb Helper (ver.12.05.1)
#61

[eluser]ardinotow[/eluser]
@ElToro,
Great! Can't wait to see your work :cheese:
#62

[eluser]ardinotow[/eluser]
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

[eluser]miano[/eluser]
This is fantastic and worked perfectly! Great customization options - fit my need perfectly. Thank you for sharing and your work. :-)
#64

[eluser]miano[/eluser]
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:
Code:
$config['use_wrapper'] = TRUE;
$config['wrapper'] = '<h3 style="margin: 10px 0 0 10px; font-size:18px" id="crumbs">| </h3>';
$config['wrapper_inline'] = '<span style="font-family:arial; text-transform:uppercase">| → </span>';

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:

Code:
$config['use_wrapper'] = TRUE;
$config['wrapper'] = '<h3 style="margin: 10px 0 0 10px; font-size:18px" id="crumbs">| </h3>';
$config['wrapper_inline'] = '<span style="font-family:arial; text-transform:uppercase">|  </span>';
$config['wrapper_arrow'] = '→';

and get

Home -> Page1 -> Page2
#65

[eluser]ardinotow[/eluser]
@miano,
You can change delimiter configuration to:
Code:
$config['delimiter'] = " → ";
Your wrapper configuration should be:
Code:
$config['use_wrapper'] = TRUE;
$config['wrapper'] = '<h3 style="margin: 10px 0 0 10px; font-size:18px" id="crumbs">|</h3>';
$config['wrapper_inline'] = '<span style="font-family:arial; text-transform:uppercase">|</span>';
#66

[eluser]miano[/eluser]
So thaaaat's what the delimiter is for. LOL thanks dude.
#67

[eluser]Benjo[/eluser]
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

[eluser]ardinotow[/eluser]
@Benjo,
I'll try to help you.
First find these code
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:
Code:
$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

[eluser]Benjo[/eluser]
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

[eluser]stikoo[/eluser]
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 Sad

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...-fittings/

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

Any help and tips gratefully received!

Alastair




Theme © iAndrew 2016 - Forum software by © MyBB