Jump to content

The mighty CMS questions!


Recommended Posts

Hi folks,

 

No 1:

How to include cms page in template page.

I believe this would be really useful for everyone as you can edit anything from admin including languages ...

 

Case: I want to have Terms and Conditions cms page on checkout page. The point is that i want customer to really read those terms and not just click on I agree.

 

Problem: I really dont know how to include cms page and the easiest solution would be trough {include} but i dont know how to call cms page and its ID

 

No2:

Im trying to figure out how to make list of cms pages in template page.

Iv tried to take code of such lists from cmsblockmodule, cms.tpl, footer, sitemap, etc ....

 

The point is that i wanna show the list of cms pages directly without configuring it trough module as it works on cms.tpl page.

Just simply load list of all the cms pages i have active back in CMS admin page.

 

thanks in advance

Edited by mr.moonkey (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

so it seems like that i need to combine this(from OrderOpcController.php):

 

 

$cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id);

$link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite, true);

if (!strpos($link_conditions, '?'))

$link_conditions .= '?content_only=1';

else

$link_conditions .= '&content_only=1';

 

 

with this(from forum by rocky for PS 1.3):

 

 

$cms = new CMS(1, intval($cookie->id_lang));

if (Validate::isLoadedObject($cms))

$smarty->assign('content', $cms->content);

 

 

and stick it there with this:

 

{$content}

 

but how to combine it?

anyone?

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