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

[eluser]ardinotow[/eluser]
** Breadcrumb Helper 4.10.1 **

Bug fixed:
1. Sometimes the replacer only replace the value of last segment.

Enjoy,
Ardinoto
#52

[eluser]ToMix[/eluser]
ardinotow,

Very Exelent.

Your last Update {Breadcrumb Helper 4.10.1} works successfully.

My probelm solved , Thank you very much.
#53

[eluser]ardinotow[/eluser]
[quote author="ToMix" date="1270470851"]ardinotow,

Very Exelent.

Your last Update {Breadcrumb Helper 4.10.1} works successfully.

My probelm solved , Thank you very much.[/quote]

You're welcome Smile
#54

[eluser]-Gareth[/eluser]
This is great! EXACTLY what I wanted!
Thanks.

Actually, it's not exactly what I need. I'm creating a forum, and so on topic pages, for example I have the url:

http://localhost/topic/view/12/gasdfa

It produces the breadcrumbs:

Home
Topic
gasdfa

which is good. However, I know I can rename Topic to Category, but two things:

1) Can I change the link that Topic/Category links to (such as it now links to localhost/topic but can I have it to localhost/category-of-topic, I'll need to pass in a variable here) ?
2) How can I pass in a variable to change Topic to the correct category name (such as News and Announcements)?

Because the config is in config/ not a controller, I cannot do any logic on it!

Edit: I would like this to happen:

Home
News And Announcements (with correct link) - this can be decided by logic
gasdfa
#55

[eluser]ardinotow[/eluser]
Hi -Gareth,

I think your request can be done without modifying the breadcrumb helper. You can change your url to be more SEO friendly (also autoCRUMB friendly) like this: http://localhost/topic/view/news-and-ann...ent/gasdfa. What do you think?
#56

[eluser]-Gareth[/eluser]
That is a possibility, however I'd still like to have it as I did...
Are there any other possibilities? I'm not particularly happy having both the category and topic names in the url..
#57

[eluser]ardinotow[/eluser]
Gareth,
I think you can try this:
1. Find this line in breadcrumb_helper
Code:
function set_breadcrumb($delimiter = '', $exclude = '')
change to
Code:
function set_breadcrumb($mod_uri = '', $delimiter = '', $exclude = '')
2. Find this line in breadcrumb_helper
Code:
$uri = rtrim($CI->uri->uri_string(),'/');
change to
Code:
if ($mod_uri)
{
   $uri = rtrim($mod_uri,'/');
}
elseif ( ! $mod_uri)
{
   $uri = rtrim($CI->uri->uri_string(),'/');
}
3. Now, in your page where you want to show breadcrumb, change standard breadcrumb caller like
Code:
<?php echo set_breadcrumb(); ?>
to
Code:
<?php
   $mod_uri = "/your/new_url_link/for_breadcrumb"; // exclude base url
   echo set_breadcrumb($mod_uri);
?>

You can also parse $mod_uri from your controller so you can do any logic on it. Hope that works. I don't have time to try those code from my localhost, so please let me know the result.
#58

[eluser]ElToro[/eluser]
Thx for the nice Helper!

Could there be possible to use arrays in replace to make two out of one?

Like this

Code:
URL: mysite.com/category_listing
CRUMBS: Home > Categorys
Code:
URL: mysite.com/category
CRUMBS: Home > CategorysListing > Category

Code:
URL: mysite.com/category/item
CRUMBS: Home > CategorysListing > Category > Item

by using
Code:
$config['replace'] = array('category' => array('category_listing' => Categorys, 'category' => 'Category'));

Well lets see if I have time to hack.
#59

[eluser]ardinotow[/eluser]
@ElToro,
Feel free to hack it Smile
#60

[eluser]ElToro[/eluser]
Ok, I had some time to play around with it.. and it is done. I still need to figure out how I can send merge request or something like in from windows hg client.




Theme © iAndrew 2016 - Forum software by © MyBB