- Posts: 3
COMMUNITY FORUM
different background color for specific article
- impuls
-
Topic Author
- Offline
- New Member
I would like to know if it is possible to change background color for specific article in blog layout. I know that you can edit k2.css, but that changes the background color for all articles. I know that i could use for example div tag but this changes the color of the content and not the whole article with title.
Thanks for your help
Please Log in or Create an account to join the conversation.
- Agence culturelle départementale Dordogne-Périgord
-
- Offline
- Junior Member
- Posts: 29
Hope this helps.
Please Log in or Create an account to join the conversation.
- impuls
-
Topic Author
- Offline
- New Member
- Posts: 3
Duane Simpson wrote: Try creating Categories and Models. you can then have different settings per different model. Take a look in documentation, it explains how to make models (in /templates/your-template/html)
Hope this helps.
I don't understand what you mean with models. Do you mean modules, or templates ? Cause when I want to edit template, I can only edit the look of all artices, and not specific ...
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- impuls
-
Topic Author
- Offline
- New Member
- Posts: 3
Krikor Boghossian wrote: Duane means templates. You can also edit category_item.php and use a different CSS class for its container, perhaps the item id. Then without any new override you will have a distinct CSS class which you can use to style every single item.
That sounds like a good idea, maybe i could add class " article# " (# = article number), to the container. But my php skills are really bad, and can't think how i would make such thing ... but i know that i will probabbly need to add it in category.php, at line 207 :
<div class="itemContainer<?php echo $lastContainer; ?>"<?php echo (count($this->secondary)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('num_secondary_columns'), 1).'%;"'; ?>>
<?php
// Load category_item.php by default
$this->item=$item;
echo $this->loadTemplate('item');
?>
</div>
correct me, if I am wrong.
Please Log in or Create an account to join the conversation.
- Brigitte
-
- Offline
- New Member
- Posts: 1
I have the same problem, could you solve it?? Can you help??
Or can somebody else help??
Best Regards
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
Let me know which of the two is your case in order to provide further information.
Please Log in or Create an account to join the conversation.