Coffe Date Created Graphic to appear in K2 Category Page

GK User
Wed Aug 24, 2011 3:07 am
Dear teitbite (or any other CSS gurus out there!),

I'm attempting to place the beautiful Coffe template "date created graphic" onto the K2 category page. As you can see from the links below, the nice graphic appears ONLY on the "item" page but not on the "category page".

Item Page (with nice date created graphic)

Category Page (without nice date created graphic)

I've had quite a time trying to adjust the CSS files to somehow get ".catItemDateCreated" to match ".itemDateCreated"'s settings, but you'll see from the link I didn't get too far.

Surely this is just a case of an amateur coder not knowing what He's doing. Can someone show me where I am off?

Thanks!

Ryan C. in KC
User avatar
Fresh Boarder

Konrad M
Wed Aug 24, 2011 8:04 am
Hi
It look's that is not css problem becasue as you see date format is diffrent. First you need to change format item in k2 view file for category. I think you will find this file in /components/com_k2/templates/default/ it was category.php or category_item.php.
Date format should be:
Code: Select all
<div class="itemDateCreated">
              <div>
               <span><?php echo JHTML::_('date', $this->item->created , 'd'); ?></span>
               <span><?php echo JHTML::_('date', $this->item->created , 'M'); ?></span>
              </div>
            </div>


After modify it you need add this to templates/gk_coffe/html/com_k2/templates/default/
User avatar

GK User
Wed Aug 24, 2011 7:30 pm
Thanks so much!

Actually the code was

<div class="itemDateCreated">
<div>
<span><?php echo JHTML::_('date', $this->item->created , '%d'); ?></span>
<span><?php echo JHTML::_('date', $this->item->created , '%b'); ?></span>
</div>
</div>

The other one just put a "dM" in the block :) I'm SO CLOSE - now I have the date there, but for some reason it writes it out on one horizontal line instead of in a column like on the item view. I can't find where the settings are different they seem to be exactly the same! Somewhere something is off.

Here's the link again.

Thanks again for your help!

Ryan
User avatar
Fresh Boarder


cron