/** * @return string */ public function Link() { $link = ''; if ($this->isInDB()) { $controller = Controller::curr(); $shop = ShopPage::get()->First(); if ($shop && $shop->exists()) { $link = Controller::join_links($shop->Parent()->Link(), 'product', $this->URLSegment); } } return $link; }
$obj = new CategoriesPage(); $module = $obj->module($params, $catType); break; case 'brand-index-page': $obj = new BrandIndexPage(); $module = $obj->module($params); break; case 'cat-by-brand-page': $obj = new CatByBrandPage(); $module = $obj->module($params); break; case 'product-by-cat-page': $obj = new ProductByCatPage(); $module = $obj->module($params); break; case 'shop-page': $obj = new ShopPage(); $module = $obj->module(); break; } $data['current-page'] = $currentPage; if ($currentPage == 'product-page') { $data['product-detail'] = $module['productDetail']; $data['spin-content'] = $module['spinContent']; } $seoTags = $module['seoTags']; $header = Html::get('main', 'header', $data); $footer = Html::get('main', 'footer', $data); /* Html::get( FunctionNmae, ID-Key, Data ); //see trait Components on html.php */