user1708597
user1708597

Reputation: 99

Prestashop how do i set a module for a single cms page?

I have a module named 'video gallery'. I want it to set for a cms page "video" only . The cms page id is '12' . I have tried {if $cms->id == 12} in video_gallery.tpl doesnt work. Someone please help me thank you!

Upvotes: 1

Views: 3838

Answers (3)

Amine Faiz
Amine Faiz

Reputation: 93

Try this one instead it works perfectly for me :

{if $smarty.get.id_cms == 12 }
 {$HOOK_WHERE_YOUR_VIDEO_MODULE_IS_ASSIGNED_TO}
{/if}

Upvotes: 0

faiz
faiz

Reputation: 123

i think the way to access the id is like this:

{if $cms.id_cms == 12 } content here {/if}

you could use the 'debug popup'/ smarty debug window to see what the 'cms id' variable is.

Upvotes: 0

user2831723
user2831723

Reputation: 892

Go to cms.tpl located in your theme folder and use this there :

{if $cms->id == 12}
    {$HOOK_WHERE_YOUR_VIDEO_MODULE_IS_ASSIGNED_TO}
{/if}

BR's

Upvotes: 1

Related Questions