Jump to content

Topcat-Style


Guest dirkn

Recommended Posts

Guest dirkn

Hello,

this is my first post here.(excuse my english :( )

I search the forum but I can't find an answer. Please help me, I want to "highlight" the choosen category-tab (Killer-Skin). No idea how to do this.

Greets

dirk

Link to comment
Share on other sites

Guest dirkn

...

You have to be familiar with PHP temlate system.

PHP-knowledge is ok but never works with template system.

Between the lines I hear you say: HANDS OFF! :)

Better I look for another layout solution!?

Thank you

dirk

Link to comment
Share on other sites

Hmmm, that was not my impression, Dirk. I think he meant the best solution lies in modding the code of those files:

includes/categories.inc.php

skins/Killer/styleTemplates/boxes/categories.tpl

skins/Killer/styleSheets/layout.css

And this will require basic knowledge of PHP, XML (or at least HTML) and CSS :)

Link to comment
Share on other sites

Guest dirkn

Thank you Mark, that exatly was what i meant :unsure:

Ok, now its clear. :zorro:

I realize a different layout of each category with the {DATA.cat_id}-variable: very simple!

But now I see: stupid. The current cat_name is in big letters on the shop-site, without any changes.

That is round about what I want. ;)

Ok, a little bit more learned about CC...!

Link to comment
Share on other sites

Guest greg_a

Hi,

I'd been pondering this too, however my knowledge of PHP isn't too great. I can see how each category has a unique cat_id (& the homepage & sale categories have 'homepage' & 'sale_items' IDs) & it's obvious enough that this has to be used somewhere to create the 'current page' type effect, but I can't quite work out how it's done. My usual technique is to assign a unique ID to the <body> tag of each page & then use a descendent selector in CSS to style it appropriately.

Would anyone be able to give me some pointers as to what needs tweaking in the categories.inc.php file?

Much appreciated.

Link to comment
Share on other sites

Guest dirkn

Hi,

I'll try to explain what I've done:

First, you must have the mod: Change Layout by Category.

in /skins/Killer/styleTemplate/boxes/categories.tpl you see {DATA.cat_id}.

Wth this cat_id you can select a style-class like

<!-- BEGIN: li -->

<td><a class="YOURSTYLECLASS{DATA.cat_id}" href="index.php?act=viewCat&catId={DATA.cat_id}">{DATA.cat_name}</a></td>

<!-- END: li -->

Only what to do is, read out the cat_id from database and create different css-classes for your different category-tabs like YOURSTYLECLASS1 or whatever your cat_id-value is.

Then, it is easy to place a different css-class to each css-file you can select by category.

HTH

Dirk

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...