Mecha CMS


Default Page Data

Table of Contents
  1. Time 
  2. ID 
  3. Type 

These page data will have their own default values.

I have updated the Page class recently so that now we can have more meaningful default page data.


The engine will first search for a hard-coded time data from the page file to be used. If it doesn’t exist, then it will use the page’s file creation time as the page time. But, if the page’s file name itself is formatted as a timestamp-like format, then the engine will try to parse the page’s file name into a valid time data. So now you can set a file name as to set the time data to 2017-04-21 14:25:02 or to set the time data to 2017-04-21 00:00:00.


The default id value will use the time value that is converted into unsigned Unix time format as string.


The default type value is text/html.