2012-01-10 1 views
2

CMSのページを表示作成日/時間などMagentoの - 私はコピー(名前変更)2columns-left.phtmlをし、適切なXML設定オプションを設定することで、カスタムCMSのレイアウトを作成している

私はしたいと思いますコンテンツの下にCMS作成時間(creation_timeフィールド)を表示します。どうすればいいのですか?

また、CMSレイアウトページでは、基になるCMSページデータにどのようにアクセスできますか?

+0

...であるあなたは何を試してみましたか?コードに貼り付けて、具体的な提案をお手伝いします。 –

+0

@JonathanDay私のファイルは、2columns-left.phtmlファイルのコピーです。 – mas

答えて

1
<?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] => 
) 

ここでは、物事の配列、残りのあなたにそのアップが

関連する問題