paperweight Posted June 21, 2016 Share Posted June 21, 2016 I have a custom hook to add an item to my menu: add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $data=Capsule::table('tblhosting')->where('userid',$_SESSION['uid'])->where('domainstatus','Active')->first(); if($data){ $secondaryNavbar = Menu::secondaryNavbar(); $contactUsLink = $secondaryNavbar->getChild('Account'); $contactUsLink->addChild('map', array( 'label' => Lang::trans('myserver_productdetailschange'), 'uri' => 'clientarea.php?action=productdetails&id='.$data->id.'', 'order' => 10, )); } }); I want to add a url link on the clientarea.php page to that same url link in the menu. I am uncertain how to unpackage the navbar hook code above to place new code inside clientarea.php. Is there an easy and fast method? Thank you~ 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted June 21, 2016 Share Posted June 21, 2016 Take a look at panels, it's probably what you're looking for 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted June 21, 2016 Author Share Posted June 21, 2016 Thanks for your help, but I'm not using panels for this. Instead I just want to output a link like this <a href="uri">label</a> that will be outside the panel structure (I'm pasting it above the beginning of the panels on its own. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 23, 2016 Share Posted June 23, 2016 don't you just need to create a hook that passes the $id value back to the template as a Smarty variable? you know the URI is going to be 'clientarea.php?action=productdetails&id=XX' - where XX is the $id value from your query. 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.