Skip to content

Instantly share code, notes, and snippets.

@hertsch
Last active August 29, 2015 14:01
Show Gist options
  • Save hertsch/f14970ebd6c9f3b6bc82 to your computer and use it in GitHub Desktop.
Save hertsch/f14970ebd6c9f3b6bc82 to your computer and use it in GitHub Desktop.
~~ page_modified_when ~~

##~~ page_modified_when ~~

The kitcommand ~~ page_modified_when ~~ return the date and time of the last modification for the current page or the page with the given PAGE_ID. The date/time string can be formatted and localized.

Parameters

All parameters are optional.

page_id[]

By default the kitCommand will show the modification date and time for the current page.

You can specify an PAGE_ID:

~~ page_modified_when page_id[123] ~~

will show the date and time for the page with the PAGE_ID 123.

format[]

By default page_modified_when will return a date and time formatted and localized, specified by the locale DATETIME_FORMAT - you will find these formatting locales in

/kit2/extension/phpmanufaktur/phpManufaktur/Basic/Data/Locale/Metric

you can add your own formats in

/kit2/extension/phpmanufaktur/phpManufaktur/TemplateTools/Data/Locale/Custom

or you use any date/time format for the date() function.

Example:

~~ page_modified_when format[Y-m-d] ~~

will return a date formatted as Year-Month-Day, i.e. 2014-05-15.

locale[]

If you are using xxx_FORMAT locales for formatting the kitCommand will try to localize this format. By default page_modified_when will use the locale for the current page. You can also force the kitCommand to use a specific locale:

~~ page_modified_when locale[fr] ~~

will try to translate the xxx_FORMAT locale to French. The French locale file must exist, otherwise the kitCommand will fall back to en (English).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment