Jump to content
Sandame

add hooks to cms pages in 1.7

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?

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Posted (edited)
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)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More