Jump to content

ystar

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • First Name
    yStar
  • Last Name
    Admin

ystar's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for the reply. I looked into that documentation. I couldn't find any examples which clarifies my issue. May I ask any good source for see some examples? And about the module, even if the module sounds promising, I cannot use that in my website, since it gives me a white page error without any error messages.
  2. I have been creating a simple blog page for my Prestashop website. SO far I have been able to create the following files and the template is displaying correctly. BlogController.php (located at /controllers/front directory) <?php class BlogControllerCore extends FrontController { public $php_self = 'blog.php'; public function setMedia() { parent::setMedia(); Tools::addCSS(_THEME_CSS_DIR_.'blog.css'); Tools::addJS(_THEME_JS_DIR_.'blog.js'); } public function displayContent() { parent::displayContent(); self::$smarty->display(_PS_THEME_DIR_.'blog.tpl'); } } ?> blog.php (located at root directory) <?php require(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/header.php'); ControllerFactory::getController('BlogController')->run(); include(dirname(__FILE__).'/footer.php'); ?> blog.tpl (located at theme directory) {capture name=path}{l s='Blog'}{/capture} <h1>{l s='Blog posts'}</h1> My question is, how can I add some mysql queries (select, show) into the pages and display my blog posts (using a while loop maybe?) in the blog page? I'm on Prestashop version 1.6.0.11
×
×
  • Create New...