hosttech Posted September 24, 2019 Share Posted September 24, 2019 Hey folks I'm trying to display a sidebar on a custom addon module page. It seems like the template used does not even support a sidebar on that page. But I cannot figure out what's wrong with it. Basically, I'm extending domain functionality. So I'd like to display the Domain sidebar. I've done this: URL for custom page: index.php?m=MODULENAME My Hook: add_hook('ClientAreaPrimarySidebar', 1, function ($menu) { if(!empty($_GET['domainid'])){ $domainid = $_GET['domainid']; }else{ $domainid = $_GET['id']; } if ($_REQUEST['m'] === 'MODULENAME'){ $clientid = $_SESSION['uid']; $client = Client::find($clientid); $domain = Domain::where('id', $domainid)->get()->first(); Menu::addContext('client', $client); Menu::addContext('domain', $domain); $menu = Menu::primarySidebar('domainView'); } }); var_dump'ing the $menu even gives the correct structure. So the Sidebar is perfectly fine. But it is not rendered. What am I missing? Thank you in advance! 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.