![]() |
![]() |
![]() |
|
|||||||
| Custom Templates You have come up with a new really appealing template and keep silence? Why not share it with others. Somebody might love it. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Oct 2005
Posts: 8
![]() |
Im trying to change the font size of sub-categories cause im planning to use a bigger font size on the top category.
Im working on Layout.php, i was thinking to have an if else condition. But I don't know how to do it. example code Code:
<div if(category is root) {class="categories"} else {class="subcategories"}>
eli |
|
|
|
|
|
#2 |
|
eSyndiCat Support Team
Join Date: Sep 2006
Posts: 384
![]() |
Hi elibest,
Please try the following code: Code:
{if $category.id eq '0'}
this is a root
{else}
this is NOT a root
{/if}
Code:
<div {if $category.id eq '0'}class="categories"{else}class="subcategories"{/if}>
|
|
|
|
|
|
#3 |
|
Join Date: Oct 2005
Posts: 8
![]() |
i already tried that, but not working, probably it will work only on .tpl file not on .php file.
waht's is the equivalent value of this condition {if $category.id eq '0'} on ordinary php command. the example is coded using smarty templating. |
|
|
|
|
|
#4 |
|
eSyndiCat Support Team
Join Date: Sep 2006
Posts: 384
![]() |
Hi elibest,
You should try the code posted above in index.tpl file. Please insert the code and you will see the result. It is recommended to use smarty code in order to customize your template. Any case if you have problems with your mod of changing font size feel free to contact. |
|
|
|
|
|
#5 |
|
Join Date: Dec 2011
Posts: 81
![]() |
you can used the different - 2 class used in category and sub category.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|