Jump to content

Sidebar child to only show on certain page?


TomW

Recommended Posts

Hey,

 

So I wrote a hook that basically adds a new panel to the sidebar named 'Domain Actions', that's fine. However, it's now displaying on every page. I was wondering if there's a way to only show this on a certain page, i.e. cart.php? This hook is in /includes/hooks/file.php if that makes a difference.

 

Any help is much appreciated!

 

Tom

Link to comment
Share on other sites

Tom,

 

it'd be useful to see your hook code to see what you've done... but if you wanted to add a child to an existing sidebar, then it should only appear if the page is calling the sidebar you've modified - it sounds as though you've added a new sidebar with your hook ?

 

Hi Brian,

 

Thanks for your speedy reply! If it helps, this is how I created the child:

 

$secondarySidebar->addChild('Domain Actions', array(
		'label' => 'Domain Actions',
		'uri' => '#',
		'icon' => 'fa-arrow-right'));

 

Which is showing on every page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated