How to remove all menus and navigation from a page?

Asked by jsherk

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?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
PHPDevShell Edit question
Assignee:
No assignee Edit question
Solved by:
TitanKing
Solved:
Last query:
Last reply:
Revision history for this message
TitanKing (titan-phpdevshell) said :
#1

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

Revision history for this message
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.

Revision history for this message
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:

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

And
    <div id="info">
    <div id="logindetail">
     <?php $template->outputLoginLink() ?>
     &#44;&nbsp;
     <?php $template->outputRole() ?>
     &#44;&nbsp;
     <?php $template->outputGroup() ?>
    </div>
    <div id="datetime">
     <?php $template->outputTime() ?>
    </div>
   </div>

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

Revision history for this message
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?

Revision history for this message
TitanKing (titan-phpdevshell) said :
#5

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

Revision history for this message
jsherk (jeff-forerunnertv) said :
#6

Thanks TitanKing, that solved my question.