How to show create date in "links" of com frontpage

Your code modifications and patches you want to share with others.
Locked
umpol
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Jun 27, 2007 7:57 am

How to show create date in "links" of com frontpage

Post by umpol » Fri Sep 04, 2009 3:02 am

Dear All,

I try to modified code for links section in com frontpage. I changed "components/com_content/frontpage/views/frontpage/tmpl/default_links.php" like below.

Code: Select all

<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<div>
	<strong><?php echo JText::_( 'More Articles...' ); ?></strong>
</div>
<ul>
<?php foreach ($this->links as $link) : ?>
	<li>
[b][u]<?php echo JHTML::_('date', $this->links->created, JText::_('DATE_FORMAT_LC4')); ?>[/u] [/b]
		<a class="blogsection" href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($link->slug, $link->catslug, $link->sectionid)); ?>">
			<?php echo $link->title; ?></a>
	</li>
<?php endforeach; ?>
</ul>
But it shows "today date" not "create date". someone please suggest me with the code.

Thank you
Umpol

User avatar
wlrdq
Joomla! Hero
Joomla! Hero
Posts: 2672
Joined: Thu Jul 24, 2008 12:48 pm
Location: Austin, TX
Contact:

Re: How to show create date in "links" of com frontpage

Post by wlrdq » Fri Sep 04, 2009 3:56 am

Try changing this:

Code: Select all

<?php echo JHTML::_('date', $this->links->created, JText::_('DATE_FORMAT_LC4')); ?>
to:

Code: Select all

<?php echo JHTML::_('date', $link->created, JText::_('DATE_FORMAT_LC4')); ?>
Will Mavis - Joomla Developer
http://www.covertapps.com/jam <<< Joomla! on your Android, iPhone, iPad, and iPod Touch
If you think I can help you, PM me a link to your post and I will respond. Please don't hijack another user's thread.

umpol
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Jun 27, 2007 7:57 am

Re: How to show create date in "links" of com frontpage

Post by umpol » Fri Sep 04, 2009 4:10 am

Many thank wlrdq :)

User avatar
wlrdq
Joomla! Hero
Joomla! Hero
Posts: 2672
Joined: Thu Jul 24, 2008 12:48 pm
Location: Austin, TX
Contact:

Re: How to show create date in "links" of com frontpage

Post by wlrdq » Fri Sep 04, 2009 4:20 am

My pleasure!
Will Mavis - Joomla Developer
http://www.covertapps.com/jam <<< Joomla! on your Android, iPhone, iPad, and iPod Touch
If you think I can help you, PM me a link to your post and I will respond. Please don't hijack another user's thread.


Locked

Return to “Core Hacks and Patches”