Jump to content

[SOLVED]Change URL or dinamic class?


Recommended Posts

Hello.

 

This is my problem:

 

I want to change category url. Edit it for example i added parteners subcategory and i dont want it to be like "5-parteners" just replace it with "manufacturers".

 

Or this is more acceptable, i would rather do this:

 

I added in category.tpl the button and i want it to have a dynamic class like this:

{if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if}

 

but i don't really know with what i should replace

$currentCategoryId

 

Please help me

 

 

 

So i found a solution, i'll share it for others.

 

This is what you should copy as many times as you need

open category.tpl. Around line 46 you should find:

{if $category->description}

this is where the editing begins.

First this is the line you need

{if $category->id == 10-parteneri}

 

if for example you want 2 link's:

{if $category->id == put here frendly url}content here for example i included a .tpl{elseif $category->id == 9-contact-us}content here

 

and after this code add

{else}

just before {$category->description}{/if}

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

  • 2 months later...

Hi... i am using a horizontal menu module for my shop. It lists all categories. I need to get category ID from that. How can i do that??? The only way i see is, break URL variable to get ID. but i never feel it as optimal solution. Because we turn off friendly URL, scenario changes.

 

Thanx in advance

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