HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Move Panels from Sidebar to Center Panel

manticore789manticore789 Down Under New
edited May 2020 in Vanilla 3.x Help

Hi all,

I'd like to know how I can move both the Categories Panel and the Popular Tags Panel from the Sidebar to the Center Panel.

I have a lot of Categories, and this extends the Sidebar down the page too far.

Any help would be appreciated.

Thanks.

MC789

Comments

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    You need a plugin or a custom theme which implements two methods: one for removing those two modules from the panel and one for adding them to the content:


       public function base_beforeRenderAsset_handler($sender, $args) {
           if (!$args['AssetName'] == 'Panel') {
               return;
           }
           if (array_key_exists(
               'TagModule',
               $sender->Assets[$args['AssetName']]
           )) {
               unset($sender->Assets[$args['AssetName']]['TagModule']);
           }
           if (array_key_exists(
               'CategoriesModule',
               $sender->Assets[$args['AssetName']]
           )) {
               unset($sender->Assets[$args['AssetName']]['CategoriesModule']);
           }
       }
    
       public function base_render_before($sender, $args) {
           if ($sender->MasterView == 'admin') {
               return;
           }
           $sender->addModule('CategoriesModule', 'Content');
           $sender->addModule('TagModule', 'Content');
        }
    

    Some additional styling would be needed, I guess

  • Options
    manticore789manticore789 Down Under New

    Sounds complicated. I think I'll leave it.

Sign In or Register to comment.