Use the HTML5 Layout Editor to control the format of the publication date for HTML5 Help Center outputs.
-
Select Layout in the top menu.
Paligo displays a list of Layouts. The list is empty if there are no custom Layouts in your Paligo instance.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select General in the sidebar.
-
Define the date format for the
pubdate
element in the Today's date for publication date field.Which date format to select depends on whether the setting Use translatable publication date is enabled or not.
Note
Be aware that:
-
If you add an empty
pubdate
element to your publication topic, Paligo will automatically insert the date when you publish. It will use the date format you set in the Layout. -
If Today's date for publication date is left empty, the publication date will not appear in the output.
-
If you have a
pubdate
element and it contains content inside it, such as a text date or a variable, that content takes priority. Paligo will ignore the Today's date for publication date value. -
If the format you define in Today's date for publication date is not supported, Paligo will include the format value in the output.
-
-
Use translatable publication date to control whether a full-text date format for the
pubdate
element should automatically be converted into other languages.For example, you could have 28 March 2024 in English. For a Swedish output, Paligo would translate the date to 28 mars 2024.
Select one of the following options:
-
Enabled to activate the auto-translation. Use EXSLT Date Format in Today's date for publication date.
-
Disabled to deactivate the auto-translation. Use PHP Date Format in Today's date for publication date.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
Use leading zero padding to control whether the date should have a leading zero for single-digit dates (when using EXSLT Date Format).
Select one of the following options:
-
Enabled to use a leading zero (for example 03).
-
Disabled to use a single digit (for example 3).
Use the PHP Date Format. It supports leading zeros by the use of different codes.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
Select Save.
When you publish with this Layout, the output will use the publication date settings you have chosen.
Use the following codes in settings where you need to specify a date and time format in the EXSLT date format:
Code |
Description |
Example of output |
---|---|---|
a |
Day abbreviation |
|
A |
Day name |
|
b |
Month abbreviation |
|
B |
Month name |
|
c |
ISO data and time, including UTC offset |
Where T is a delimiter between the date and time.-05:00 is the offset from UTC, in this example, 5 hours behind UTC. |
d |
Day in month |
|
H |
Hour in day |
|
j |
Day in year |
|
m |
Month in year |
|
M |
Minute in hour |
|
S |
Second in minute |
|
U |
Week in year |
|
w |
Day in week (Sunday = 1) |
|
Y |
Year |
|
Use the following codes when you need to specify a date and time format in a setting that requires the PHP date format:
Character |
Description |
Example of output |
---|---|---|
d |
Day of the month, 2 digits with leading zeros |
|
D |
Three letter representation of the day |
|
j |
Day of month without leading zeros |
|
l |
Full text of day of the week |
|
N |
ISO 8601 numeric representation of the day of the week |
|
S |
English ordinal suffix of the day of the month, shown as 2 characters |
|
w |
Numeric representation of the day of the week |
|
z |
Day of the year, starting from 0 |
|
W |
1SO 8601 week number of the year, with weeks starting on Monday |
For 42nd week in the year |
F |
Full text of month |
|
m |
Numeric representation of month, with leading zeros |
|
M |
Short text for month, three letters |
|
n |
Numeric representation of a month, without leading zeros |
|
t |
Number of days in the month |
|
L |
Leap year |
|
o |
ISO 8601 week-numbering year. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. |
|
X |
Not supported in Paligo |
N/A |
x |
Not supported in Paligo |
N/A |
Y |
Full numeric representation of a year. Has at least 4 digits or - for years BCE |
|
y |
Two digit representation of a year |
|
a |
Lowercase Ante meridiem (am) and Post meridiem (pm) |
|
A |
Uppercase Ante meridiem (am) and Post meridiem (pm) |
|
B |
Swatch Internet time |
|
g |
12-hour format of an hour, no leading zeros |
|
G |
24-hour format of an hour, no leading zeros |
|
h |
12-hour format of an hour with leading zeros |
|
H |
24-hour format of an hour with leading zeros |
|
i |
Minutes with leading zeros |
|
s |
Seconds with leading zeros |
|
u |
Microseconds Note that date() will always generate 000000 since it takes an int parameter. DateTime::format() does support microseconds if DateTime was created with microseconds. |
|
v |
Milliseconds. Note that date() will always generate 000000 since it takes an int parameter. DateTime::format() does support microseconds if DateTime was created with microseconds. |
|
e |
Timezone identifier |
|
I |
Indicates if date is in daylight saving time |
|
O |
Difference to Greenwich Meantime (GMT). No colon between hours and minutes. |
|
P |
Difference to Greenwich Meantime (GMT). Colon between hours and minutes. |
|
p |
Difference to Greenwich Meantime (GMT) but returns z instead of +00:00. Colon between hours and minutes. |
|
T |
Timezone abbreviation, if known, otherwise GMT offset. |
|
Z |
Timezone offset in seconds. Timezone offsets west of UTC is always negative. East of UTC is always positive. |
|
c |
ISO 8601 date |
|
r |
» RFC 2822/» RFC 5322 formatted date |
|
U |
Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) |
|
This table is based on information on php.net.
Comments
0 comments
Article is closed for comments.