Keyword

rearranging mod_k2_content custom template

  • kristofferrom
  • kristofferrom's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 5 months ago - 12 years 5 months ago #64832 by kristofferrom
rearranging mod_k2_content custom template was created by kristofferrom
I'm using the content module to display the newest item in a category in a sidebar.

The order of content should be:

img
title
tag
read more

I've rearranged the template as follows, but it doesn't work. Any ideas?
<!-- Plugins: AfterDisplayTitle -->
      <?php echo $item->event->AfterDisplayTitle; ?>

      <!-- K2 Plugins: K2AfterDisplayTitle -->
      <?php echo $item->event->K2AfterDisplayTitle; ?>

      <!-- Plugins: BeforeDisplayContent -->
      <?php echo $item->event->BeforeDisplayContent; ?>

      <!-- K2 Plugins: K2BeforeDisplayContent -->
      <?php echo $item->event->K2BeforeDisplayContent; ?>

      <?php if($params->get('itemImage') || $params->get('itemIntroText')): ?>
      <div class="moduleItemIntrotext">
              <?php if($params->get('itemImage') && isset($item->image)): ?>
              <a class="moduleItemImage" href="<?php echo $item->link; ?>" title="<?php echo JText::_('K2_CONTINUE_READING'); ?> &quot;<?php echo K2HelperUtilities::cleanHtml($item->title); ?>&quot;">
                <img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>"/>
              </a>
              <?php endif; ?>
              
              <?php if($params->get('itemTitle')): ?>
      <a class="moduleItemTitle" href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
      <?php endif; ?>
      
            <?php if($params->get('itemTags') && count($item->tags)>0): ?>
      <div class="moduleItemTags">
        <b><?php echo JText::_('K2_TAGS'); ?>:</b>
        <?php foreach ($item->tags as $tag): ?>
        <a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a>
        <?php endforeach; ?>
      </div>
      <?php endif; ?>

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum