Jump to content

stylesheet per section ?


Guest

Recommended Posts

Does anyone know if/how to apply a differnt style sheet depending on which section the user is in. (like http://www.ebuyer.co.uk) I just want to change the general colour scheme for each category section, so the user knows they are in a different section of the site, selling different products.

Cheers Tim

Link to comment
Share on other sites

Guest estelle

Hi redbak, here's a basic overview of how I would implement this....

You'd need to edit skins/{your skin}/styleTemplates/global/index.tpl and replace the stylesheet definition with a variable placeholder, e.g. {VAL_STYLESHEET}

And then in index.php you'd need to assign a value using $body->assign("VAL_STYLESHEET",......); based on the value of $_GET['act'] and various other things too.

E.g. For index.php?act=viewCat&catId=1

$_GET['act'] is viewCat, so then you'd just assign whichever stylesheet you want to use for the category $_GET['catId']

E.g. For index.php?act=viewProd&productId=1

$_GET['act'] is viewProd, you'd need to lookup $_GET['productId'] to figure out which category the product is in, and then assign the appropriate stylesheet.

E.g. For anything else, just assign your default stylesheet.

Estelle.

Link to comment
Share on other sites

Estelle, i see you do mods and obviously know what you are talking about. How much would it cost to work it out for me ?

I've got a client that is pretty keen for diffent category areas to look different, but i don't have the skills to impliment it. If you can help please email through my profile or reply on the thread.

Cheers Tim

p.s id want to be using the search engine mod in the downloads section if thgat complicates matters.

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