「当サイトについて」ページにアクセスした場合。
http://xxxx.com/about/index.php
↓
eccube/html/about/index.php
↓
[OUT]
eccube/data/class_extends/page_extends/abouts/LC_Page_Abouts_Ex.php
|
[extends]
eccube/data/class/pages/abouts/LC_Page_Abouts.php
| |
| init()で使用するテンプレートやtitleをセット
| |
| process()で
| ・レイアウト取得
| ・テンプレ用のデータ取得
| ・テンプレへデータをセット
| ・テンプレの表示
| |
| destroy()
|
[extends]
eccube/data/class/pages/LC_Page.php
aboutのindex.php。基本となる形。
require_once("../require.php");
require_once(CLASS_EX_PATH . "page_extends/abouts/LC_Page_Abouts_Ex.php");
$objPage = new LC_Page_Abouts_Ex();
register_shutdown_function(array($objPage, "destroy"));
$objPage->init();
$objPage->process();
aboutのinit()メソッド
function init() {
parent::init();
$this->tpl_mainpage = 'abouts/index.tpl';
$this->tpl_page_category = 'abouts';
$this->tpl_title = '当サイトについて';
}
aboutのprocess()メソッド
function process() {
$objView = new SC_SiteView();
// レイアウトデザインを取得
$layout = new SC_Helper_PageLayout_Ex();
$layout->sfGetPageLayout($this, false, DEF_LAYOUT);
$objView->assignobj($this);
$objView->display(SITE_FRAME);
}
assignobj()でテンプレにデータをセットし、display()で表示する。
ちなみにキャンペーンと絡む場合はdisplay()を使わず
$objCampaignSess->pageView($this->objView);
で分岐からdisplay()する。
2011-09-19
2009-06-01
2009-05-28
2009-05-27
2009-05-26
2009-05-25
2009-05-19
2009-05-15
2009-05-14
2009-05-13
2009-05-12
2009-05-11