Jump to content

Making the info block an actual page on site


Recommended Posts

You would need to create an info.php page with the following in the root directory of PrestaShop:

<?php
   include(dirname(__FILE__).'/config/config.inc.php');
   include_once(dirname(__FILE__).'/init.php');

   $cms = CMS::listCms($cookie->id_lang);
   $id_cms = array();
   foreach($cms AS $row)
       $id_cms[] = intval($row['id_cms']);
   $smarty->assign('cmslinks', $id_cms ? CMS::getLinks($cookie->id_lang, $id_cms) : array());
   include_once(dirname(__FILE__).'/header.php');
   $smarty->display(_PS_THEME_DIR_.'info.tpl');
   include(dirname(__FILE__).'/footer.php');
?>



and the following in info.tpl in your theme's directory:

{l s='Information'}
{foreach from=$cmslinks item=cmslink name=cmslinks}
   <a href="{$cmslink.link}" title="{$cmslink.meta_title|escape:html:'UTF-8'}">{$cmslink.meta_title|escape:html:'UTF-8'}{if !$smarty.foreach.cmslinks.last}
{/if}
{/foreach}



You can then link to {$base_dir}info.php to link to the page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...