I'm working on changing a megamenu into a module to help with future updates and in the process thought it would be easier to place the link to the CSS and JS script in the controller file for the module. I have read several posts about doing this but it never seems to push those links into the header. Has anyone been able to get this to work?
are you putting in a module controller or one you made yourself. If it doesn't work it's generally because the child order is wrong, but this has been fixed in all the core files for several versions now.
just check your childeren call with a that from a standard file from a recent version. basically the header has to be after the controller where the addstyle/addscript is called for instance if you call it in a module that is in the left column header would have to be after column_left in the childeren list.
that's not a mainpage controller. If you are adding it to the header and it's not working my guess is that you added your new module below the addscript and addstyle calls and it would need to be above for the call to get registered.
they can, but from what it sounds like you have already edited the core files to add a module position in the header, but you didn't do it correctly, and the addscript from the module is not getting called until after the header has already set all the scirpts.scott23 wrote:I gotcha now. I guess I thought that those could be used directly in the module controller to keep from having to edit the core files. Thanks for the help.
Who is online
Users browsing this forum: No registered users and 3 guests