2
votes

I have created a custom CMS layout by copying (and renaming) the 2columns-left.phtml and setting the appropriate xml configuration options, etc.

I would like to display the CMS Creation Time (the creation_time field) below the content. How do I do it?

Alternatively, in a CMS layout page, how can I access the underlying CMS page data?

1
what have you tried? paste in your code so we can help you with specific suggestions. - Jonathan Day
@JonathanDay My file is a copy of the 2columns-left.phtml file. - mas

1 Answers

1
votes
<?php
   $collection = Mage::getModel('cms/page')->getCollection();  

   foreach($collection as $page) {
      print_r($page->debug());
   }
?>

[Array]  
(  
    [page_id] => 2  
    [title] => Home Page  
    [root_template] => three_columns  
    [meta_keywords] =>  
    [meta_description] =>  
    [identifier] => home  
    [content] => Hello...  
    [creation_time] => 2012-01-11 21:15:34  
    [update_time] => 2012-01-11 21:18:16  
    [is_active] => 1  
    [sort_order] => 0  
    [layout_update_xml] =>  
    [custom_theme] =>  
)  

Here is the array, rest of things its up to you...