Jump to content

Problem with cms content // Empty pages


obeatone

Recommended Posts

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

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

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

  • 5 months later...
  • 11 months later...

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

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...