Skip to content

Instantly share code, notes, and snippets.

@hertsch
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hertsch/21b3e4898bd9a13018a1 to your computer and use it in GitHub Desktop.
Save hertsch/21b3e4898bd9a13018a1 to your computer and use it in GitHub Desktop.
~~ cms_modified_when ~~

##~~ cms_modified_when ~~

The kitcommand ~~ cms_modified_when ~~ return the date and time of the last modification of a page of the Content Management System (CMS). The date/time string can be formatted and localized.

Parameters

All parameters are optional.

format[]

By default cms_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:

~~ cms_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:

~~ cms_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