- Posts: 5
COMMUNITY FORUM
Moving the
- Robbie Forsyth
- Topic Author
- Offline
- New Member
Less
More
11 years 1 month ago #117573
by Robbie Forsyth
Moving the was created by Robbie Forsyth
Hi guys,
I'm new to K2 and someone else installed it - so am just trying to become self sufficient. So apologies if this is very basic.
Here's an example of an article on our site: www.youthfootballscotland.co.uk/component/k2/item/7501-scotland-s-youngsters-cool-ahead-of-iceland-test
What I want to do is move the photo of the author (which will be accompanied by a short bio) to the top of the page. Just underneath the headline.
Any idea how I can do this?
Thanks a lot.
I'm new to K2 and someone else installed it - so am just trying to become self sufficient. So apologies if this is very basic.
Here's an example of an article on our site: www.youthfootballscotland.co.uk/component/k2/item/7501-scotland-s-youngsters-cool-ahead-of-iceland-test
What I want to do is move the photo of the author (which will be accompanied by a short bio) to the top of the page. Just underneath the headline.
Any idea how I can do this?
Thanks a lot.
Please Log in or Create an account to join the conversation.
- olsen
- Offline
- Elite Member
- Joomla and K2 Freelancer
11 years 1 month ago #117574
by olsen
Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details
Replied by olsen on topic Re: Moving the
Hi,
the file you should edit is components/com_k2/templates/default/item.php
Search this code:
and place it on top just after the headline block:
Before do it make a template override. There is enough information about it at the documentation menu on this site.
the file you should edit is components/com_k2/templates/default/item.php
Search this code:
<?php if($this->item->params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?>
<!-- Author Block -->
<div class="itemAuthorBlock">
<?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)): ?>
<img class="itemAuthorAvatar" src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />
<?php endif; ?>
<div class="itemAuthorDetails">
<h3 class="itemAuthorName">
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
</h3>
<?php if($this->item->params->get('itemAuthorDescription') && !empty($this->item->author->profile->description)): ?>
<p><?php echo $this->item->author->profile->description; ?></p>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthorURL') && !empty($this->item->author->profile->url)): ?>
<span class="itemAuthorUrl"><?php echo JText::_('K2_WEBSITE'); ?> <a rel="me" href="<?php echo $this->item->author->profile->url; ?>" target="_blank"><?php echo str_replace('http://','',$this->item->author->profile->url); ?></a></span>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthorEmail')): ?>
<span class="itemAuthorEmail"><?php echo JText::_('K2_EMAIL'); ?> <?php echo JHTML::_('Email.cloak', $this->item->author->email); ?></span>
<?php endif; ?>
<div class="clr"></div>
<!-- K2 Plugins: K2UserDisplay -->
<?php echo $this->item->event->K2UserDisplay; ?>
</div>
<div class="clr"></div>
</div>
<?php endif; ?>
and place it on top just after the headline block:
<div class="itemHeader">
<?php if($this->item->params->get('itemDateCreated')): ?>
<!-- Date created -->
<span class="itemDateCreated">
<?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php if($this->item->params->get('itemTitle')): ?>
<!-- Item title -->
<h2 class="itemTitle">
<?php if(isset($this->item->editLink)): ?>
<!-- Item edit link -->
<span class="itemEditLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
<?php echo JText::_('K2_EDIT_ITEM'); ?>
</a>
</span>
<?php endif; ?>
<?php echo $this->item->title; ?>
<?php if($this->item->params->get('itemFeaturedNotice') && $this->item->featured): ?>
<!-- Featured flag -->
<span>
<sup>
<?php echo JText::_('K2_FEATURED'); ?>
</sup>
</span>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthor')): ?>
<!-- Item Author -->
<span class="itemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>
<?php if(empty($this->item->created_by_alias)): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
<?php else: ?>
<?php echo $this->item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>
</div>
Before do it make a template override. There is enough information about it at the documentation menu on this site.
Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details
Please Log in or Create an account to join the conversation.
- Robbie Forsyth
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
11 years 1 month ago #117575
by Robbie Forsyth
Replied by Robbie Forsyth on topic Re: Moving the
I tried looking at the template override documentation and was a little confused, so tried it without and it worked fine...
www.youthfootballscotland.co.uk/component/k2/item/7501-scotland-s-youngsters-cool-ahead-of-iceland-test
Any dangers I'm not seeing?
www.youthfootballscotland.co.uk/component/k2/item/7501-scotland-s-youngsters-cool-ahead-of-iceland-test
Any dangers I'm not seeing?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 1 month ago #117576
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: Moving the
Yes if you are editing core files withou overriding them (files in /components/com_k2/templates/ folders) you will lose all changes next time you update K2.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Robbie Forsyth
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
11 years 1 month ago #117577
by Robbie Forsyth
Replied by Robbie Forsyth on topic Re: Moving the
Oh OK - that's not a big deal, I've only changed one small bit of CSS so can easily do again. Thanks a lot.
Please Log in or Create an account to join the conversation.