- Posts: 16
COMMUNITY FORUM
k2-change catitemcategory situation
- magdakar
-
Topic Author
- Offline
- New Member
Less
More
10 years 5 months ago #134413
by magdakar
k2-change catitemcategory situation was created by magdakar
hello.. i need ur help.. i want to change the situation of category name . I want to put it, on the top of item ..
1. category name
2.item title
3.image
4.itemtext
etc.
How i will do???
and i want it in categoryblog and into item.
Thanks in abvance...
1. category name
2.item title
3.image
4.itemtext
etc.
How i will do???
and i want it in categoryblog and into item.
Thanks in abvance...
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
10 years 5 months ago #134424
by Lefteris
Replied by Lefteris on topic k2-change catitemcategory situation
Hi. First read getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates . Then you will have to create an override . Once you do, you will be able to just move the piece of code that prints the category name to the top. Let me know if you need more help.
Please Log in or Create an account to join the conversation.
- magdakar
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 16
10 years 5 months ago #134478
by magdakar
Replied by magdakar on topic k2-change catitemcategory situation
Sorry lefteri, its easy to you to help me where excactly i will change the code? the code is this???
<?php if($this->params->get('genericItemCategory')): ?>
<!-- Item category name -->
<div class="genericItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>
</div>
<?php endif; ?>
Here??? /components/com_k2/templates/generic.php
<?php if($this->params->get('genericItemCategory')): ?>
<!-- Item category name -->
<div class="genericItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>
</div>
<?php endif; ?>
Here??? /components/com_k2/templates/generic.php
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 5 months ago #134489
by Krikor Boghossian
Replied by Krikor Boghossian on topic k2-change catitemcategory situation
Please read the post Lefteris sent you.
The file you need to override is item.php for the single item and category_item.php for the item category listings.
The generic.php file is used for search/ date listings only.
Finally the code for that file is indeed correct and the code for the item.php will look similar.
The file you need to override is item.php for the single item and category_item.php for the item category listings.
The generic.php file is used for search/ date listings only.
Finally the code for that file is indeed correct and the code for the item.php will look similar.
Please Log in or Create an account to join the conversation.
- magdakar
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 16
10 years 5 months ago #134493
by magdakar
Replied by magdakar on topic k2-change catitemcategory situation
so in the public_html/components/com_k2/templates/default/category_item.php i have charge the the situation but i dont see the change front of the site, in home page.
so in the item.php dont work too.
:/
so in the item.php dont work too.
:/
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 5 months ago #134502
by Krikor Boghossian
Replied by Krikor Boghossian on topic k2-change catitemcategory situation
Please read the link Lefteris posted.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
This post contains all the info on how to work with overrides.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
This post contains all the info on how to work with overrides.
Please Log in or Create an account to join the conversation.
- magdakar
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 16
10 years 5 months ago #134530
by magdakar
Replied by magdakar on topic k2-change catitemcategory situation
it works.. thanks a lot...!!!!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 5 months ago #134543
by Krikor Boghossian
Replied by Krikor Boghossian on topic k2-change catitemcategory situation
You 're welcome
Please Log in or Create an account to join the conversation.