How can i add the button "New Discussion" at the top bar ?

I want to remove the "New Discussion" button from the side bar and move it to the top bar. Right now i can hide the sidebar button with CSS but how can i add it to the top bar of my custom theme ??

Is there any function like {bookmarks_link} or something similar so i can add it in my defalut.master.tpl file ?

PS im on vanilla 2.6 (php 7.2)

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    If you already have a base_render_before method in your themehooks file, inspect $sender->Assets, most probably Assets['Panel'], to see all modules. A simple unset $sender->Assets['Panel' ] ['NewDiscussionModule' ] should do the trick

    To set the module, you need to have an "asset" in the template. You can use the addModule('NewDiscussionModule', 'SomeAssetTargetName')


  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited May 2018

    If you are more familiar with CSS you can also use the “position” property. “fixed” or “absolute” can dona good job depending on the theme.

    Not super clean but also Javascript allows you to move around elements.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    And for the second part of the question : those are the Smarty functions you can use. https://github.com/vanilla/vanilla/tree/master/library/SmartyPlugins
    The module function will enable you to insert a module wherever you want. Look at how it is done in the default.master.tpl with the MeModule


Sign In or Register to comment.