24khost Posted January 5, 2011 Share Posted January 5, 2011 Is there a way to use templates in addon modules? 0 Quote Link to comment Share on other sites More sharing options...
24khost Posted January 5, 2011 Author Share Posted January 5, 2011 I am trying to create my first module and the new module system the documentation does not describe the process of using the menus on the left hand side in the side bar. 0 Quote Link to comment Share on other sites More sharing options...
24khost Posted January 5, 2011 Author Share Posted January 5, 2011 anyone? I am stuck 0 Quote Link to comment Share on other sites More sharing options...
turbosatan Posted January 5, 2011 Share Posted January 5, 2011 from the addon guide Sidebar An addon module can also define HTML code to be displayed in the sidebar. You can do anything you want with this, but it is ideal for creating custom sub menus specific to a custom module. The function is passed all the same variables as the main content output function, and so can be used like this: function your_module_name_sidebar($vars) { $modulelink = $vars['modulelink']; $username = $vars['username']; $password = $vars['password']; $sidebar = '<span class="header"><img src="images/icons/addonmodules.png" class="absmiddle" width="16" height="16" /> Sample</span> <ul class="menu"> <li><a href="#">Sample Sidebar Link 1</a></li> <li><a href="#">Sample Sidebar Link 2</a></li> </ul>'; return $sidebar; } 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.