ArthurianX Posted August 4, 2010 Share Posted August 4, 2010 Hello, I seem to miss something, I am posting here, hoping that someone can recognize my err.So, I have a plugin that I want to place on my media page. The media page is a custom page in which I have another hook that actually works.Let's start from the beginning:Pre: I install the plugin.1. I make my new hooks: http://screencast.com/t/ODg0NjBiN2. I insert my hooks in my custom page .php: $smarty->assign(array( 'HOOK_SMECHER' => Module::hookExec('smecher'), 'HOOK_MEDIAPIC' => Module::hookExec('mediapic'), 'HOOK_MEDIAVID' => Module::hookExec('mediavid'), 'HOOK_HOME' => Module::hookExec('home'))); $smarty->display(_PS_THEME_DIR_.'media.tpl'); 3. I insert my hooks(sounds funny) in my custom tpl: <!--/popular--> {$HOOK_MEDIAPIC} registerHook('mediapic') OR !$this->registerHook('header') ) return false; return true; } 5. In admin the plugin works, I install it. It is already placed in my hook that is supposed to show on the custom page.and then my custom page shows nothingThis is the exact method I used to show the cart on that page, (it has no columns, that's why, to answer your question )I'm still in the phase which something should get posted in the header of my page, but it doesn't, that doesn't matter, it should show a long list of pictures as html. Link to comment Share on other sites More sharing options...
rocky Posted August 5, 2010 Share Posted August 5, 2010 It looks like you've messed up the code, or it hasn't posted right. You shouldn't use the registerHook function in TPL files. It should be used in the install() function of a module only. 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