How to remove all menus and navigation from a page?

Asked by jsherk on 2011-01-17

I was wondering how to remove all the menus and navigation links from a page under certain circumstances?

I might have a page that I would access normally from the browser in which case I want all the menus and navigation links, but there are other times when I want to display that page in a javascript modal window, so in this case I do not want any menus or navigation links.

Is there some kind of beforeShow hook for menus and navigation so they could be removed when desired?


Question information

English Edit question
PHPDevShell Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
TitanKing (titan-phpdevshell) said : #1

Are you looking at removing breadcrumbs too or just the menu items?

jsherk (jeff-forerunnertv) said : #2

Need to remove everything in this particular case... menus, navigvation, breadcrumbs, logout link so that there are no links left that can take you off the page.

Best TitanKing (titan-phpdevshell) said : #3

This can be achieved by duplicating the cloud theme, rename it to what you want and edit theme.php, now remove items like:

   <div id="menu">
    <!-- MENU AREA -->
    <ul id="nav">
     <?php $template->outputMenu() ?>
   <div id="scripticon">
    <?php $template->outputScriptIcon() ?>
   <div id="history">
    <ul id="bread">
     <?php $template->outputBreadcrumbs() ?>

    <div id="info">
    <div id="logindetail">
     <?php $template->outputLoginLink() ?>
     <?php $template->outputRole() ?>
     <?php $template->outputGroup() ?>
    <div id="datetime">
     <?php $template->outputTime() ?>

Now just assign your menu item to this new custom theme.

jsherk (jeff-forerunnertv) said : #4

But what about when I want to view this menu item normally with all the breadcrumbs and navigation?

Can I create a new menu item that is symlink to original menu item, and then set symlink to new custom theme with no breadcrumbs or navigation, and them leave the original menu item set to original theme with breadcrumbs and navigation?

TitanKing (titan-phpdevshell) said : #5

Correct, you can create multiple links and different sets of permission, custom themes etc for a single menu item.

jsherk (jeff-forerunnertv) said : #6

Thanks TitanKing, that solved my question.