i did what you say but layout is now messed up: i did work on the original one and now i lost those edits, looks like not responding to same css or not influenced by backend k2 configuration...
it's not possible to work on this code
- Code: Select all
<section class="itemList">
<?php foreach ($this->items as $item): ?>
<article class="itemView<?php if(!$item->published || ($item->publish_up != $this->nullDate && $item->publish_up > $this->now) || ($item->publish_down != $this->nullDate && $item->publish_down < $this->now)) echo ' itemViewUnpublished'; ?><?php echo ($item->featured) ? ' itemIsFeatured' : ''; ?> clearfix"> <?php echo $item->event->BeforeDisplay; ?> <?php echo $item->event->K2BeforeDisplay; ?>
<header>
<?php if($this->params->get('userItemTitle')): ?>
<h2>
<?php if ($this->params->get('userItemTitleLinked') && $item->published): ?>
<a href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a>
<?php else: ?>
<?php echo $item->title; ?>
<?php endif; ?>
<?php if(!$item->published || ($item->publish_up != $this->nullDate && $item->publish_up > $this->now) || ($item->publish_down != $this->nullDate && $item->publish_down < $this->now)): ?>
<sup><?php echo JText::_('K2_UNPUBLISHED'); ?></sup>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if($this->params->get('userItemCategory') || ($this->params->get('userItemCommentsAnchor') && ( ($this->params->get('comments') == '2' && !$this->user->guest) || ($this->params->get('comments') == '1'))) || $this->params->get('userItemDateCreated')) : ?>
<ul>
<?php if($this->params->get('userItemCategory')): ?>
<li class="itemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a> </li>
<?php endif; ?>
<?php if($this->params->get('userItemCommentsAnchor') && ( ($this->params->get('comments') == '2' && !$this->user->guest) || ($this->params->get('comments') == '1'))): ?>
<li class="itemComments">
<?php if(!empty($item->event->K2CommentsCounter)): ?>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $item->event->K2CommentsCounter; ?>
<?php else: ?>
<?php if($item->numOfComments > 0): ?>
<a href="<?php echo $item->link; ?>#itemCommentsAnchor"> <?php echo $item->numOfComments; ?> <?php echo ($item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </a>
<?php else: ?>
<a href="<?php echo $item->link; ?>#itemCommentsAnchor"> <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?> </a>
<?php endif; ?>
<?php endif; ?>
</li>
<?php endif; ?>
<?php if($this->params->get('userItemDateCreated')): ?>
<li class="itemDate">
<time datetime="<?php echo JHtml::_('date', $item->created, JText::_(DATE_W3C)); ?>"> <?php echo JHTML::_('date', $item->created , JText::_('F j, Y')); ?> </time>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
</header>
<?php echo $item->event->AfterDisplayTitle; ?> <?php echo $item->event->K2AfterDisplayTitle; ?>
<?php if($this->params->get('userItemImage') && !empty($item->imageGeneric)): ?>
<div class="itemImageBlock"> <a class="itemImage" href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>"> <img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $this->params->get('itemImageGeneric'); ?>px; height:auto;" />
</a> </div>
<?php endif; ?>
<div class="itemBody"> <?php echo $item->event->BeforeDisplayContent; ?> <?php echo $item->event->K2BeforeDisplayContent; ?>
<?php if($this->params->get('userItemIntroText')): ?>
<div class="itemIntroText"><?php echo $item->introtext; ?></div>
<?php endif; ?>
<?php echo $item->event->AfterDisplayContent; ?> <?php echo $item->event->K2AfterDisplayContent; ?>
<?php if($this->params->get('userItemTags') && isset($item->tags)): ?>
<div class="itemTagsBlock">
<ul class="itemTags">
<?php foreach ($item->tags as $tag): ?>
<li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php if ($item->params->get('genericItemReadMore')): ?>
<a class="itemReadMore button" href="<?php echo $item->link; ?>"> <?php echo JText::_('K2_READ_MORE'); ?> </a>
<?php endif; ?>
</div>
<?php echo $item->event->AfterDisplay; ?> <?php echo $item->event->K2AfterDisplay; ?> </article>
<?php endforeach; ?>
</section>
with some css/html so that the images to that the items will be displayed on a fixed number of columns, say 3?