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

[eluser]ardinotow[/eluser]
[quote author="nguyen van khanh" date="1386145441"]
Code:
id    catename                   parent id
1      Gối                            0
2      Hello kitty                  0    
3      Gối xinh                    1
4      Hello kitty xinh          2

base_url: http://localhost/shop

my url:

Code:
http://localhost/shop/san-pham/1/goi.html
http://localhost/shop/san-pham/2/hello-kitty.html
http://localhost/shop/san-pham/3/goi-xinh.html
http://localhost/shop/san-pham/4/hello-kitty-xinh.html

i want to display breadcrumb:

Code:
http://localhost/shop/san-pham/1/goi.html          -> Trang chủ // Sản phẩm // Gối
http://localhost/shop/san-pham/2/hello-kitty.html          -> Trang chủ // Sản phẩm // Hello kitty
http://localhost/shop/san-pham/3/goi-xinh.html            -> Trang chủ // Sản phẩm // Gối // Gối xinih
http://localhost/shop/san-pham/4/hello-kitty-xinh.html  -> Trang chủ // Sản phẩm // Hello kitty // Hello kitty xinh

Please help me![/quote]
Hi,
You can use this line on your controller:
Code:
$param = $this->uri->segment(2);
if ($param == 1 || $param == 2) {
   $replace_value = ' ';
} elseif ($param == 3) {
   $replace_value = ' Gối';
} elseif ($param == 4) {
   $replace_value = 'Hello kitty';
}
$this->config->load('breadcrumb');
$this->config->set_item('replacer_embed', array($param=>$replace_value));

Yeah, sure those code only show you a simple logic but I hope you catch the idea

[eluser]Unknown[/eluser]
Hello!

I have this kind of URL:

/posts/view/post-slug

and the Breadcrumb shows

Home -> Post Slug

but my post title is something different like "This is the post"

and instead of

Home -> Post Slug

.. i need

Home -> This is the post

Is this possible?

Thank you!




Theme © iAndrew 2016 - Forum software by © MyBB