Date of articles

Author Message

risto CMS user

Friday 18 November 2005 7:53:09 am

It there a way of spesifying the date of articles?

Gurudutt Verma

Saturday 19 November 2005 3:31:48 am

Hi Risto

What do you want here ?

you can use publish date as

{$node.object.published|l10n(date)}

If you want to add your own date then you have to create another class similar to article and add one more attribute of date datatype and then create template for that as per requirement.

risto CMS user

Friday 25 November 2005 4:54:59 am

I wonted to be able to edit the publish date of articles and display it with day.month.year

dd.mm.yyyy
25.11.2005

Gurudutt Verma

Friday 25 November 2005 5:13:10 am

Hi!

well it is difficult to edit publish date but you can display ti in custom format.

see following links

http://ez.no/products/ez_publish_cms/documentation/development/libraries/ez_template/operators/miscellaneous
http://ez.no/products/ez_publish_cms/documentation/customization/tips_tricks/date_and_time_formats

try to use something like

{$node.object.published|datetime(custom,"%m %y")}

risto CMS user

Monday 28 November 2005 12:59:04 am

Im having problems her:

{$node.object.data_map.utgitt|datetime(custom,"%d %m %Y")}
{$node.object.utgitt|datetime(custom,"%d %m %Y")}

none of these are working. I get 1970 as the yeasr onf 01 01 as day month.

Ɓukasz Serwatka

Monday 28 November 2005 1:06:24 am

This is correct, datetime() expect timestamp (unix time format) as input, so with your code returns wrong date.

Use code below:

If utgitt is date datatype:

{$node.object.data_map.utgitt.content.timestamp|datetime('custom','%d %m %Y')}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:13:53
Script start
Timing: Jan 31 2025 04:13:53
Module start 'layout'
Timing: Jan 31 2025 04:13:53
Module start 'content'
Timing: Jan 31 2025 04:13:53
Module end 'content'
Timing: Jan 31 2025 04:13:53
Script end

Main resources:

Total runtime0.0140 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1328151.2109
Module start 'layout' 0.00480.0023 739.343836.6484
Module start 'content' 0.00700.0054 775.992294.2813
Module end 'content' 0.01250.0015 870.273437.9922
Script end 0.0140  908.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002316.3494140.0002
Check MTime0.00117.6163140.0001
Mysql Total
Database connection0.00075.296310.0007
Mysqli_queries0.001813.154030.0006
Looping result0.00000.227810.0000
Template Total0.00118.010.0011
Template load0.00096.181810.0009
Template processing0.00031.803410.0003
Override
Cache load0.00064.084410.0006
General
dbfile0.00128.444180.0001
String conversion0.00000.056140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs