luke.lukas Posted December 9, 2021 Share Posted December 9, 2021 Hello, I know you can use: public function hookDisplayLeftColumn() { return ' abc '; } In your main module file after registering a hook, but how do you do the exact same thing from within a controller? My reasoning for wanting this is that I have a new product page, and want to display custom content (categories/filter etc) within the leftcolumn. The controller has all of the queries already loaded for the content in the leftcolumn, and I'd like to not have to call them again for the main file. Thanks, Luke Link to comment Share on other sites More sharing options...
Krystian Podemski Posted December 9, 2021 Share Posted December 9, 2021 I think what you want to do is: $leftColumn = Hook::exec('displayLeftColumn'); // and there you probably need to pass this to the view :-) 1 Link to comment Share on other sites More sharing options...
luke.lukas Posted December 9, 2021 Author Share Posted December 9, 2021 (edited) 2 hours ago, Krystian Podemski said: I think what you want to do is: $leftColumn = Hook::exec('displayLeftColumn'); // and there you probably need to pass this to the view :-) Hello, Thanks for the reply. I believe you're getting and storing the left column in that variable. What I'd like is to have the text 'abc' sit at the top of the left column, which is set in my module's controller. Thanks, Luke Edited December 9, 2021 by luke.lukas (see edit history) Link to comment Share on other sites More sharing options...
Krystian Podemski Posted December 15, 2021 Share Posted December 15, 2021 It's not working like this. You should hook the module into left column and pass the content to it via hookDisplayLeftColumn 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