<?php require_once 'init.php'; $page = cf\api\page\get('main'); $smarty->assign('pageId', cf\api\page\getID('about')); $smarty->assign('pageText', $smarty->fetch('index.tpl')); $crumbs = array(); show('page', null, $crumbs, $page['title'], $page['keywords'], $page['descr']);
<?php require_once 'init.php'; require_once cf\Config::path . 'api/shop.php'; try { $cat = cf\Group::get(cf\param::get('id')); } catch (Exception $e) { Header('Location: /error'); exit; } $smarty->assign('pageText', $cat->descr()); $smarty->assign('pageId', cf\api\page\getID('products')); $products = cf\api\shop\getProducts($cat->id()); foreach ($products as &$product) { $info = cf\api\shop\getProduct($product[0]); $product['attributes'] = $info['attributes']; } $smarty->assign('products', $products); show('category', $cat->name(), array(), $cat->pageTitle(), $cat->pageKeywords(), $cat->pageDescr());