obeatone Posted February 12, 2014 Share Posted February 12, 2014 Hi,I have a problem with my website on Prestashop.I'm working on it and now I don't know why the content in CMS pages do not appear Here an exemple of a page : http://www.knieja-wood.com/site/content/4-About Any idea ?Thank you in advance for your help !Regards,Thibault Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 Hi. Post the content cms.tpl Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 Here is the content of my file cms.tpl in my theme folder : {if $cms->id != $cgv_id} {include file="$tpl_dir./breadcrumb.tpl"} {/if} {if isset($cms) && !isset($category)} {if !$cms->active} <div id="admin-action-cms"> <p>{l s='This CMS page is not visible to your customers.'} <input type="hidden" id="admin-action-cms-id" value="{$cms->id}" /> <input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishCMS('{$base_dir}{$smarty.get.ad}', 0)"/> <input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishCMS('{$base_dir}{$smarty.get.ad}', 1)"/> </p> <div class="clear" ></div> <p id="admin-action-result"></p> </p> </div> {/if} <div class="rte cms{if $content_only} content_only{/if}"> {$cms->content} </div> {elseif isset($category)} <div> <h1>{$category->name|escape:'htmlall':'UTF-8'}</h1> {if isset($sub_category) & !empty($sub_category)} <h4>{l s='List of sub categories in '}{$category->name}{l s=':'}</h4> <ul class="bullet"> {foreach from=$sub_category item=subcategory} <li> <a href="{$link->getCMSCategoryLink($subcategory.id_cms_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> {/if} {if isset($cms_pages) & !empty($cms_pages)} <h4>{l s='List of pages in '}{$category->name}{l s=':'}</h4> <ul class="bullet"> {foreach from=$cms_pages item=cmspages} <li> <a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> {/if} </div> {else} {l s='This page does not exist.'} {/if} Thank you very much for your help ! Link to comment Share on other sites More sharing options...
vekia Posted February 12, 2014 Share Posted February 12, 2014 hello your cms page has got contents defined for your front office main language? Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 Yes i have contents defined in the BO for my About page.The problem is that contents do not appear Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 You should enable the DEBUG CONSOLE at Performance. Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 Done, and what can I do with this DEBUG CONSOLE ? Thank you very much ! Link to comment Share on other sites More sharing options...
vekia Posted February 12, 2014 Share Posted February 12, 2014 Yes i have contents defined in the BO for my About page. The problem is that contents do not appear contents also dont appear when they aren't defined this is why i asked about languages. for example en_US language isn't the same as en_GB Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 I have only one language, FR and the content is defined in the FR case. I don't think the problem is here no ? Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 Done, and what can I do with this DEBUG CONSOLE ? Thank you very much ! The debug console will show you which variables have been passed to the template and their value. But you didn't enable it. Regards. Robin. The CartExpert Team Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 The debug console will show you which variables have been passed to the template and their value. But you didn't enable it. Regards. Robin. The CartExpert Team Console enabled ! Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 What exactly did you put to the content of About us? Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 I put exactly this : <h1 class="category_title">About</h1> <p>dsqdqsdqsdsqjdqjsdjkqsjkdjk jkdqsjkdjkqdjk jkqdjk jkdjkqjkd jkqjdk qdjk jqkjkd jqkd jkqs</p> But i can put anything, it still don't appear Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 The values are passed to the template, so there must be something wrong within the template file. Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 (edited) Please post the content of the initContent function from CmsCrontroller.php $category and $cms shouldn't be assigned to the template file at the same time. Regards.Robin.The CartExpert Team Edited February 12, 2014 by CartExpert.net (see edit history) Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 Here the content of the iniContent : public function initContent() { parent::initContent(); $parent_cat = new CMSCategory(1, $this->context->language->id); $this->context->smarty->assign('id_current_lang', $this->context->language->id); $this->context->smarty->assign('home_title', $parent_cat->name); $this->context->smarty->assign('cgv_id', Configuration::get('PS_CONDITIONS_CMS_ID')); if (isset($this->cms->id_cms_category) && $this->cms->id_cms_category) $path = Tools::getFullPath($this->cms->id_cms_category, $this->cms->meta_title, 'CMS'); else if (isset($this->cms_category->meta_title)) $path = Tools::getFullPath(1, $this->cms_category->meta_title, 'CMS'); if ($this->assignCase == 1) { $this->context->smarty->assign(array( 'cms' => $this->cms, 'content_only' => (int)(Tools::getValue('content_only')), 'path' => $path )); if ($this->cms->indexation == 0) $this->context->smarty->assign('nobots', true); } else if ($this->assignCase == 2) { $this->context->smarty->assign(array( 'category' => $this->cms_category, //for backward compatibility 'cms_category' => $this->cms_category, 'sub_category' => $this->cms_category->getSubCategories($this->context->language->id), 'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id), true, (int)$this->context->shop->id), 'path' => ($this->cms_category->id !== 1) ? Tools::getPath($this->cms_category->id, $this->cms_category->name, false, 'CMS') : '', )); } $this->setTemplate(_PS_THEME_DIR_.'cms.tpl'); } } Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 (edited) Then some other script assigns the $category. What you should do now is to change $category to $cms_category in the cms.tpl and that will work. Regards.Robin.The CartExpert Team Edited February 12, 2014 by CartExpert.net (see edit history) Link to comment Share on other sites More sharing options...
obeatone Posted February 12, 2014 Author Share Posted February 12, 2014 OWWW it worrrksss !!!Thank you very very much !! Regards,Thibault Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 12, 2014 Share Posted February 12, 2014 You can disable the DEBUG CONSOLE now. And don't forget to mark the topic as [sOLVED] Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
ankursachdeva Posted July 30, 2014 Share Posted July 30, 2014 hi i am getting problem with my website cms pages, pages are showing blank. please help me. my website is : http://modernfurniture.com.au/ Link to comment Share on other sites More sharing options...
baratisimo.com.co Posted July 5, 2015 Share Posted July 5, 2015 Im have the same problem with the CMS-Pages from the Home-Directory,im dont can edit the existing CMS-Pages (default-CMS from the Template) and if im add a new page this page is empty Example:http://baratisimo.com.co/index.php?id_cms=6&controller=cms&id_lang=1&live_configurator_token=c717a37b3798f47c64526d01715aeb57&id_shop=1&id_employee=1&theme_font=&theme=theme2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now