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!
Asked
Active
Viewed 3,806 times
1

Mario Radomanana
- 1,698
- 1
- 21
- 31

user1708597
- 101
- 5
- 10
3 Answers
1
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

user2831723
- 832
- 12
- 25
-
new to prestashop cant find the hook for this module – user1708597 Feb 17 '14 at 07:49
-
can you please provide a module name? If it's a free module then I can check it out for you. – user2831723 Feb 17 '14 at 10:34
-
Its Video gallery v1.3 by Bl Modules. Thanks for your time buddy – user1708597 Feb 17 '14 at 12:57
-
Well it is assigned by default to big hooks where you probably have some other content positioned as well. But you could ( just for testing ) use this hook displayFooterProduct – user2831723 Feb 17 '14 at 13:39
-
Added this line top of page {if $cms->id == 12} {$displayFooterProduct} {/if} doesnt work – user1708597 Feb 17 '14 at 14:39
-
and i am using 1.4.7.3 – user1708597 Feb 17 '14 at 15:12
-
well obviously it doesnt work that way :) Gave you just a hook name. To display it use this ($HOOK_PRODUCT_FOOTER) – user2831723 Feb 17 '14 at 16:45
-
I have tried {$cms->id} to echo the id display nothing .. may be its my version not supporting! – user1708597 Feb 17 '14 at 18:32
-
im not sure but try either this {$cmspages.id_cms eq 12 } or this {$cmspages.id_cms == 12} Should be exact same thing but you never know. And 1.4 presta is fairly new to me :) – user2831723 Feb 18 '14 at 09:49
-
May be i am doing something wrong i tried adding in my theme matrice > cms.tpl still no luck :( – user1708597 Feb 18 '14 at 12:56
0
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.

faiz
- 123
- 5
- 16
0
Try this one instead it works perfectly for me :
{if $smarty.get.id_cms == 12 }
{$HOOK_WHERE_YOUR_VIDEO_MODULE_IS_ASSIGNED_TO}
{/if}

Amine Faiz
- 93
- 1
- 2