Jump to content

add hooks to cms pages in 1.7


Sandame

Recommended Posts

Hi,

i am trying to add a module to a specific cms page

however cms pages don't let me run any smarty code  which mean i can't call any of my hooks.

like so:

{hook h='displayavis'}

i have seen solutions for 1.6 but they all revolve around editing cms.tpl which doesn't seem to exist in 1.7.

 

could anyone suggest a solution?

 

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

To do that, you have to edit the \themes\yourtheme\templates\cms\page.tpl file.

Put that code anywhere you like.

If you just want that code to be show on a specific cms page, alert 6 as the cms page's ID. Use this code instead.

{if $cms.id==6}{hook h='displayavis'}{/if}

 

Regards,

Jonny

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
On 6/12/2019 at 9:02 AM, Himanshubishtt said:

Hi,

I am using Ps 1.7.2

Ex- I want to add a module services block module to a cms page id 4. How can I do it?

Thanks in advance

I guess that would only be something like

{if $cms.id==4}{hook h='displayServiceBlock_or_whatever_its_name_is'}{/if}
Edited by R.Shredder
oops (see edit history)
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...