- Posts: 27
COMMUNITY FORUM
Get category ID
- Francisco Caivano Zori
-
Topic Author
- Offline
- Junior Member
Less
More
14 years 11 months ago #91118
by Francisco Caivano Zori
Get category ID was created by Francisco Caivano Zori
In the LATEST view i would like to ad the CATEGORY ID in the template, so it looks like this:<div class="productslatestItemsContainer CATEGORYID" style="width: 100%;"></div>
This would give me the chance to add custom stylyng (for example border color) in some specific categories.Anyone knows what code should i add on latest/view.html.php and after on latest.php to achieve this?Bye
This would give me the chance to add custom stylyng (for example border color) in some specific categories.Anyone knows what code should i add on latest/view.html.php and after on latest.php to achieve this?Bye
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
14 years 11 months ago #91119
by Jiliko.net
Replied by Jiliko.net on topic Get category ID
Hi Francisco,
I've checked the latests.php file and can't find the piece of code you've pasted.
You can get the id of the category by doing this, depending from where you are in the code :
$category->id
$item->catid
Olivier
Olivier
I've checked the latests.php file and can't find the piece of code you've pasted.
You can get the id of the category by doing this, depending from where you are in the code :
$category->id
$item->catid
Olivier
Olivier
Please Log in or Create an account to join the conversation.
- Francisco Caivano Zori
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 27
14 years 11 months ago #91120
by Francisco Caivano Zori
Replied by Francisco Caivano Zori on topic Get category ID
Like this right?
< ?php $category->id; ?>
(without the first space)
< ?php $category->id; ?>
(without the first space)
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
14 years 11 months ago #91121
by Jiliko.net
Replied by Jiliko.net on topic Get category ID
You can do that :
span class="start-tag">div class="productslatestItemsContainer < ?php echo $category->id; ?>" style="width: 100%;">
if the $category variable is initalized at this part of the code.
Olivier
Francisco Caivano said:Like this right?
< ?php $category->id; ?>
(without the first space)
span class="start-tag">div class="productslatestItemsContainer < ?php echo $category->id; ?>" style="width: 100%;">
if the $category variable is initalized at this part of the code.
Olivier
Francisco Caivano said:Like this right?
< ?php $category->id; ?>
(without the first space)
Please Log in or Create an account to join the conversation.