Jump to content

How to redirect a category links to CMS links?


paparda_87@hotmail.com

Recommended Posts

Hello,

 

Appreciate if someone could help how could I redirect the category link to cms link.

 

I created CMS pages, for example, http://www.aimeeandiipo.com/shop/en/content/10-products

but if a customer click each subcategory , for example, "Earrings" http://www.aimeeandiipo.com/shop/en/18-earrings

 

There will be a path shown like this (red square) ;

error.jpg

 

I want to make the link "Product" here to go back to the CMS page  http://www.aimeeandiipo.com/shop/en/content/10-products not the category page. 

 

Can anyone help me pls?

Link to comment
Share on other sites

Hi Nishith,

 

Thank you for your advice. I am a beginner. I look at the file but I am not sure how should I change it?

 

<!-- Breadcrumb -->
{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if}
<div class="breadcrumb clearfix">
<a href="{$base_dir}" title="{l s='return to'} {l s='Home'}" itemprop="url">{l s='Home'}</a>
{if isset($path) AND $path}
<span class="navigation-pipe" {if isset($category) && isset($category->id_category) && $category->id_category == 1}style="display:none;"{/if}>{$navigationPipe|escape:'html':'UTF-8'}</span>
{if !$path|strpos:'span'}
<span class="navigation_page">{$path}</span>
{else}
{$path}
{/if}
{/if}
</div>
{if isset($smarty.get.search_query) && isset($smarty.get.results) && $smarty.get.results > 1 && isset($smarty.server.HTTP_REFERER)}
<div class="pull-right">
<strong>
<a href="{$smarty.server.HTTP_REFERER|escape}" onclick="history.back();">
<i class="icon-chevron-left left"></i> {l s='Back to Search results for "%s" (%d other results)' sprintf=[$smarty.get.search_query,$smarty.get.results]}
</a>
</strong>
</div>
{/if}
<!-- /Breadcrumb -->
Link to comment
Share on other sites

I'm using 1.6.1.1

hi..

 

you can change this file classes/Tools.php file.

 

in public static function getPath() under this function 

 

 foreach ($categories as $category) {
                    $full_path .=
                    (($n < $n_categories || $link_on_the_item) ? '<a href="'.Tools::safeOutput($context->link->getCategoryLink((int)$category['id_category'], $category['link_rewrite'])).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'" data-gg="">' : '').
                    htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').
                    (($n < $n_categories || $link_on_the_item) ? '</a>' : '').
                    (($n++ != $n_categories || !empty($path)) ? '<span class="navigation-pipe">'.$pipe.'</span>' : '');
                }

in a tag paste your link..first backup your file then after changes apply

 

thanks

 

Edited by Nishith (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...