HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.
Include Model in Menu
How can I include a model for my application across all pages so I can use one of the functions within the Header Menu?
Example:
I'd like to include the model for MyApplication for use in the main menu at all times. Thanks for any help you can provide!
Example:
public function Base_Render_Before(&$Sender) { if($Sender->Menu && Session->IsValid()) { $Sender->MyApplication->MyFunction($Session->UserID); } }
I'd like to include the model for MyApplication for use in the main menu at all times. Thanks for any help you can provide!
0
Comments
If it is an application, you should be able to just instantiate the model and Garden will find, include, and instantiate it for you. If it's a plugin, you can include the file right above your plugin's class definition.