K2 "add a new item in this cateogry" is missing

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sun Jun 03, 2012 5:38 am
Reply with quote
Report this post
I am trying to allow my users to add K2 items in the front, but in category view, "Add a new item in this category" and "Edit item" links are missing! It is weird because "Edit item" link shows properly in Item view. Can somebody check if the code allows these links to appear in category view? I would appreciate your help very much!
User avatar
Junior Boarder

GK User
Sun Jun 03, 2012 11:29 am
Reply with quote
Report this post
In the template directory inside html/com_k2/default/category.php file please add inside element:

Code: Select all
<div class="itemsCategory">


this code:


Code: Select all
<?php if(isset($this->addLink)): ?>
<a class="catItemAddLink modal" rel="{handler:'iframe',size:{x:990,y:650}}" href="<?php echo $this->addLink; ?>">
   <?php echo JText::_('K2_ADD_A_NEW_ITEM_IN_THIS_CATEGORY'); ?>
</a>
<?php endif; ?>


Additionally in file: html/com_k2/default/category.item.php after line:

Code: Select all
<header>


please add this fragment:

Code: Select all
<?php if(isset($this->item->editLink)): ?>
<a class="catItemEditLink modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
   <?php echo JText::_('K2_EDIT_ITEM'); ?>
</a>
<?php endif; ?>
User avatar
Administrator

GK User
Sun Jun 03, 2012 8:19 pm
Reply with quote
Report this post
dziudek,

You are the MAN! Everything works after following your instructions. I have one additional issue with K2 front-end editing, but I will post it in a separate post. Thank you SO MUCH!
User avatar
Junior Boarder


cron