Jump to content

body class - category title


Alex.1

Recommended Posts

Hi, 

In index.php ... to this line :

<body class="<?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?><?php echo $this->direction == 'rtl' ? ' rtl' : ''?>">

I would like to add a new class which would be the current category title. 

It would look like this: 

<body class="<?php echo $cat_id;?> <?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?><?php echo $this->direction == 'rtl' ? ' rtl' : ''?>">

 

Any tip how to get the $cat_id to reflect the current category title?

Much appreciated, 

Alex

 

PS: I am trying to avoid editing the menus... especially if I'll have a lot of categories...

Link to comment
×
×
  • Create New...