S7 Media Ltd Posted October 6, 2015 Share Posted October 6, 2015 Hi there, how do I go about including module files within my own theme? I don't want to use hooks, as the layout of modules inside those hooks seems very rigid and sloppy CSS code is the only way to move divs around. For example, I'd like to include blocktopmenu in header.tpl. I have tried {include file="$tpl_dir./modules/blocktopmenu/blocktopmenu.tpl"} Which returns the following error: Notice: Undefined index: MENU in /home/s7media/public_html/test/loveyourspecialday/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 28Notice: Trying to get property of non-object in /home/s7media/public_html/test/loveyourspecialday/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 28 I've tried a few different variations yielding no results. How can I go about this please? Thanks Link to comment Share on other sites More sharing options...
yaniv14 Posted October 10, 2015 Share Posted October 10, 2015 I am not sure why you prefer not to use hooks but anyway you cannot load module by calling the template file, you are missing all the server side processing of the module. My only suggestion for you is to create a new hook for the desire module, position the module in that hook and than call the hook in your header.tpl. like: {hook h='new_hook_name' mod='name_of_module'} check this tutorial if you are not sure about how to create new hook, http://doc.prestashop.com/display/PS16/Managing+Hooks Link to comment Share on other sites More sharing options...
S7 Media Ltd Posted October 28, 2015 Author Share Posted October 28, 2015 Hi thanks for the reply. Yeah I just think the hook system is too rigid. Looks like I'll be using hooks. Thanks anyway. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now