FORUM IS CLOSED. PLEASE USE QUESTIONS / ANSWERS PAGE INSTEAD
Login  |  Forum  |  Search   

Board index » Development » Help requests




Post new topic Reply to topic  [ 8 posts ] 
 
Author Message
 Post subject: Change the date format
 Post Posted: Mon May 23, 2011 4:39 pm 
Offline

Joined: Tue May 17, 2011 3:45 pm
Posts: 14
I have ask already here viewtopic.php?f=7&t=321
But I don't know override template file and format date.
Attachment:
change_dates.png
change_dates.png [ 20.58 KiB | Viewed 767 times ]


Thanks in advance

Hans


Top 
 Profile  
 
 Post subject: Re: Change the date format
 Post Posted: Mon May 23, 2011 6:19 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
You can't change them here. You need to change them on the output. In template.


Top 
 Profile  
 
 Post subject: Re: Change the date format
 Post Posted: Tue May 24, 2011 7:41 am 
Offline

Joined: Tue May 17, 2011 3:45 pm
Posts: 14
I know.
(But I don't know override template file and format date.)


But how?

A little Code Example would be nice.

Thank you in advance.

Hans


Top 
 Profile  
 
 Post subject: Re: Change the date format
 Post Posted: Tue May 24, 2011 2:49 pm 
Offline

Joined: Tue May 24, 2011 2:48 pm
Posts: 1
hans wrote:
I know.
(But I don't know override template file and format date.)


But how?


I also have the same question!







Professor Katherine Bodenhamer Anderson


Last edited by kittydalt on Sun Jul 03, 2011 6:58 am, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Change the date format
 Post Posted: Tue May 24, 2011 4:04 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
As I told before, you can't change format of the date in menu management. It is hard coded. The only thing you can change is how these values are presented on the website for the visitors. But by default ImpressPages does not show those values anywhere. So tell me where on the public part of website are these dates visible, then I can show you an example how to change them.

P.S. I understood, that ImpressPages need global setting to set date/time format for all website.


Top 
 Profile  
 
 Post subject: Re: Change the date format
 Post Posted: Tue May 24, 2011 5:16 pm 
Offline

Joined: Tue May 17, 2011 3:45 pm
Posts: 14
Hi maskas,

<div class="news_blog">
<?php

$newsZone = $site->getZoneByModule('display_content', 'news_blog');

$limit = 3;
//$layout = 'blog'; //blog style - long long page with all information from all articles.
//$layout = 'news'; //title date and first paragraph of text.
$layout = 'newsIntro'; //title date and first widget (with photos or anything else.

echo $newsZone->generateNews($limit, $layout);

?>
</div>


Attachment:
date.png
date.png [ 1.65 KiB | Viewed 726 times ]




Cheers

Hans


Top 
 Profile  
 
 Post subject: Re: Change the date format
 Post Posted: Tue May 24, 2011 6:32 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
It is easy. Just extract attached file to your theme directory. It will override the default template.php file. Change it to your needs. I've changed it to 24.05.2011 format for an example.

How to override default template.php file


Attachments:
ip_themes.rar [1.17 KiB]
Downloaded 81 times
Top 
 Profile  
 
 Post subject: Re: Change the date format
 Post Posted: Wed May 25, 2011 9:05 am 
Offline

Joined: Tue May 17, 2011 3:45 pm
Posts: 14
Hi maskas,

it works.

Thank you very much.

Strange, I had no "modules" directory in my ip_default.

Cheers

Hans


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 8 posts ] 

Board index » Development » Help requests


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron