Article header styling (move created date and title)

GK User
Sat Jul 13, 2013 5:33 pm
Hi there!

I was wondering is it possible to move "Created date" below the article title (so its aligned left, before the Author name), and also have article title float all the way to the left?

Right now, even when "created date" is off, title stays at the same position and looks weird.

Attached is a screenshot of what I mean.

I'm on Joomla! 2.5.9, using K2 Component.

Thanks a lot in advance!
User avatar
Fresh Boarder

GK User
Sat Jul 13, 2013 6:57 pm
Hi,
"There's nothing you can't do
Now you're in New York!
"

Yes you can.

Code: Select all
I'm on Joomla! 2.5.9, using K2 Component.

Please update you Joomla! first (2.5.11), we care about your security.

title stays at the same position and looks weird.

Not really when somebody use margins/paddings

Give me second I will give you tips
User avatar
Platinum Boarder

GK User
Sat Jul 13, 2013 8:26 pm
First you have too change left margin from 112px to 10px

Code: Select all
.itemToolbar {
    margin: 0 0 25px 10px;
}


Second, you have to edit K2 template file

templates/gk_finance_business/html/com_k2/templates/default/item.php

to change position of date block (from line 56)
Code: Select all
 <time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>">
                <?php echo JHTML::_('date', $this->item->created , 'd-m-Y'); ?>
              </time>


to ~~109
Code: Select all
<li> <time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>">
                <?php echo JHTML::_('date', $this->item->created , 'd-m-Y'); ?>
              </time></li>
User avatar
Platinum Boarder

GK User
Sat Jul 13, 2013 8:32 pm
p.s.
Remember to delete all <div> block from line 55-59

Code: Select all
   <div class="itemDateCreated">
              <time datetime="<?php echo JHtml::_('date', $this->item->created, JText::_(DATE_W3C)); ?>">
                <?php echo JHTML::_('date', $this->item->created , 'd-m-Y'); ?>
              </time>
            </div>
User avatar
Platinum Boarder

GK User
Sun Jul 14, 2013 3:19 pm
Thank you Pawel!

Worked like a charm :D
User avatar
Fresh Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.