Move "ItemAsideInfo" position

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
Wed May 22, 2013 3:51 pm
Reply with quote
Report this post
Hello, I am using this template, and I would like to "move" the itemAsideInfo position (where the print, email links are shown) from the left of the article to "above" the title / image of the article... and when moved, move the entire article to the left so it can occupy the "100%" of the position width... can this be achieved? Any help of how I can do it?
Thanks in advance.
User avatar
Fresh Boarder

GK User
Wed May 22, 2013 6:13 pm
Reply with quote
Report this post
You will need to edit file:
/templates/gk_simplicity/html/com_k2/templates/default/item.php

and move entire block starting in line 132 and ending in line 211
Code: Select all
   <?php
   if(
      $params->get('itemSocialButton') ||
      $params->get('itemVideoAnchor') ||
      $params->get('itemImageGalleryAnchor') ||
      $params->get('itemHits') ||
      $params->get('itemCategory') ||
      $params->get('itemTags') ||
      $params->get('itemPrintButton') ||
      $params->get('itemEmailButton') ||
      ($params->get('itemAuthorBlock') && empty($this->item->created_by_alias)) ||
      ($params->get('itemTags') && count($this->item->tags))
   ) :
   ?>
   <aside class="itemAsideInfo">
      <?php if($params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?>
      <?php if($params->get('itemAuthorImage') && !empty($this->item->author->avatar)):?>
      <img src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />
      <?php endif; ?>
      <?php if($params->get('itemAuthorEmail')):?>
      <?php echo JHTML::_('Email.cloak', $this->item->author->email); ?>
      <?php endif; ?>
      <?php echo $this->item->event->K2UserDisplay; ?>
      <?php endif; ?>
      <?php
      if(
         ($params->get('itemSocialButton') && !is_null($params->get('socialButtonCode', NULL))) ||
         ($params->get('itemVideoAnchor') && !empty($this->item->video)) ||
         ($params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)) ||
         $params->get('itemHits') ||
         $params->get('itemCategory') ||
         $params->get('itemPrintButton') ||
         $params->get('itemEmailButton') ||
         ($params->get('itemTags') && count($this->item->tags))
      ) :
      ?>
      <ul>
         <?php if($params->get('itemCategory')): ?>
         <li class="itemCategory">
            <p><?php echo JText::_('K2_PUBLISHED_IN'); ?></p>
            <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a> </li>
         <?php endif; ?>
         <?php if($params->get('itemHits')): ?>
         <li class="itemHits"> <?php echo JText::_('K2_READ'); ?> <?php echo $this->item->hits; ?> <?php echo JText::_('K2_TIMES'); ?> </li>
         <?php endif; ?>
         <?php if($params->get('itemSocialButton') && !is_null($params->get('socialButtonCode', NULL))): ?>
         <li class="itemSocial"> <?php echo $params->get('socialButtonCode'); ?> </li>
         <?php endif; ?>
         <?php if($params->get('itemVideoAnchor') && !empty($this->item->video)): ?>
         <li class="itemVideo"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a> </li>
         <?php endif; ?>
         <?php if($params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?>
         <li class="itemGallery"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a> </li>
         <?php endif; ?>
         <?php if($params->get('itemTags') && count($this->item->tags)): ?>
         <li class="itemTagsBlock">
            <p><?php echo JText::_('K2_TAGGED_UNDER'); ?></p>
            <?php foreach ($this->item->tags as $tag): ?>
            <a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?>, </a>
            <?php endforeach; ?>
         </li>
         <?php endif; ?>
         <?php
         if(
            $params->get('itemPrintButton') ||
            $params->get('itemEmailButton')
         ) :
         ?>
         <li class="itemPrintEmail">
            <?php if($params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
            <a rel="nofollow" href="<?php echo $this->item->printLink; ?>" onclick="window.open(this.href,'printWindow','width=900,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes'); return false;"> <?php echo JText::_('K2_PRINT'); ?> </a>,
            <?php endif; ?>
            <?php if($params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
            <a rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;"> <?php echo JText::_('K2_EMAIL'); ?> </a>
            <?php endif; ?>
         </li>
         <?php endif; ?>
      </ul>
      <?php endif; ?>
   </aside>
   <?php endif; ?>


just after line 23 (indicated by "!!!MOVE ENTIRE BLOCK TO THIS PLACE!!!"):
Code: Select all
   <a class="itemEditLink modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>"><?php echo JText::_('K2_EDIT_ITEM'); ?></a>
   <?php endif; ?>
!!!MOVE ENTIRE BLOCK TO THIS PLACE!!!
   <div class="itemBody<?php if(



With that change You can enable override.css in theme settings and edit the file:
/templates/gk_simplicity/css/override.css adding at its end:
Code: Select all
.itemView .itemBody.containsItemInfo, .itemView .itemOtherElements.containsItemInfo, .itemView .itemListView .itemBlock.containsItemInfo {margin: 0px;}
.itemView article aside {float: none;}
.itemView .itemAsideInfo {position: relative}


But this is just a beginning and workd mostly for single article. If You would like to style also category index, tag index, blog index, You need to do similar changes also in:
/templates/gk_simplicity/html/com_k2/templates/default/category_item.php
/templates/gk_simplicity/html/com_k2/templates/default/user.php

so there is a lot of work, not mention making news styles for aside element so it would look vertically not horizontally.
User avatar
Moderator

GK User
Wed May 22, 2013 6:16 pm
Reply with quote
Report this post
Hi Cyberek, thanks for your quick answer... just one clarification, this is for a single K2 article right? I was trying to achive the same thing for a content (joomla) article, is the file the same?
Thanks in advance, again.
User avatar
Fresh Boarder

GK User
Wed May 22, 2013 6:29 pm
Reply with quote
Report this post
Yep, the solution is for single k2 article.
Files You need to check beside that one are:
/templates/gk_simplicity/html/com_k2/templates/default/category_item.php
/templates/gk_simplicity/html/com_k2/templates/default/user.php
/templates/gk_simplicity/html/com_content/article/default.php
User avatar
Moderator


cron