Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Change where messages are rendered
jspautsch
✭✭✭
I'd like to change the messages to render before the content wrapper instead of inside it, but I can't seem to figure out where this is handled in the code. Anyone have any tips or ideas?
Tagged:
0
Best Answer
-
jspautsch ✭✭✭Hmmm, looks like modules get added to an array, along with all other content, and then that array is dumped into the Content div.
I think I can use the BeforeAddModule event (under Gdn_Controller->AddModule()) to grab the module content and print it out using a custom event I placed before the content div in my theme's default.master.tpl. However, I'm having trouble getting the arguments from AddModule. I tried $Sender->Module but that didn't seem to work, and I also tried GetValue('Module',$Args) after adding an $Args parameter to my handler function, but that doesn't seem to work either. Any tips?
0
Answers
i use a plugin called Pockets - the main advantage is it has more areas defined and control where you want to display your message.
There was an error rendering this rich post.
There was an error rendering this rich post.
There was an error rendering this rich post.
I'd like to have a message displayed near the top of the page that users can dismiss. My theme is fixed-width so has a wrapper with content and panel inside of it. Right now the messages are placed inside the content div, but I'd rather have them just outside of the content div (inside the main wrapper).
I think it's a module, so it's position is determined by AssetTarget being set to either Content or Panel, right?
I think I can use the BeforeAddModule event (under Gdn_Controller->AddModule()) to grab the module content and print it out using a custom event I placed before the content div in my theme's default.master.tpl. However, I'm having trouble getting the arguments from AddModule. I tried $Sender->Module but that didn't seem to work, and I also tried GetValue('Module',$Args) after adding an $Args parameter to my handler function, but that doesn't seem to work either. Any tips?
Any headway on this?
I saw the Pockets plugin mentioned in another thread. It's awesome.
it looks like the beforeAddModule is useless
this event does not pass any data about module that will be added
the only thing you can be sure about - some module is added