<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=Menus</id>
	<title>Menus - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=Menus"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Menus&amp;action=history"/>
	<updated>2026-08-22T20:17:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Menus&amp;diff=2179&amp;oldid=prev</id>
		<title>Admin: 7 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Menus&amp;diff=2179&amp;oldid=prev"/>
		<updated>2016-04-06T20:14:34Z</updated>

		<summary type="html">&lt;p&gt;7 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;There are three types of menus in RT4: the main menu, the page menu, and the page widgets.&lt;br /&gt;
&lt;br /&gt;
==Modifying Menus==&lt;br /&gt;
All of these menus can be altered, culled, and augmented by [[CustomizingWithCallbacks]]. The main RT menu can be modified from the &amp;quot;Menu&amp;quot; object in the callback. Here is an example of adding a new root menu item to RT:&lt;br /&gt;
&lt;br /&gt;
=== local/html/Callbacks/*/Elements/Tabs/Privileged ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%init&amp;gt;&lt;br /&gt;
 # Add a brand new root menu item&lt;br /&gt;
 my $bps = Menu()-&amp;gt;child(&lt;br /&gt;
     &amp;#039;bps&amp;#039;, # any unique identifier&lt;br /&gt;
     title =&amp;gt; &amp;#039;Corporate&amp;#039;,&lt;br /&gt;
     path  =&amp;gt; &amp;#039;[http://bestpractical.com http://bestpractical.com]&amp;#039;&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 #Add a submenu item to this root menu item&lt;br /&gt;
 $bps-&amp;gt;child(&lt;br /&gt;
     &amp;#039;wiki&amp;#039;,&lt;br /&gt;
     title =&amp;gt; &amp;#039;Wiki&amp;#039;,&lt;br /&gt;
     path  =&amp;gt; &amp;#039;[http://wiki.bestpractical.com http://wiki.bestpractical.com]&amp;#039;,&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 #Retrieve the &amp;#039;actions&amp;#039; page menu item&lt;br /&gt;
 if (my $actions = PageMenu-&amp;gt;child(&amp;#039;actions&amp;#039;)) {&lt;br /&gt;
     $actions-&amp;gt;child(&lt;br /&gt;
         &amp;#039;newitem&amp;#039;,&lt;br /&gt;
         title =&amp;gt; loc(&amp;#039;New Action&amp;#039;), path =&amp;gt; &amp;#039;/new/thing/here&amp;#039;,&lt;br /&gt;
     )&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # Remove the &amp;#039;home&amp;#039; root menu item (don&amp;#039;t try this at home!)&lt;br /&gt;
 Menu-&amp;gt;delete(&amp;#039;home&amp;#039;);&lt;br /&gt;
 &lt;br /&gt;
 # The &amp;#039;home&amp;#039; menu item key comes from the first argument to -&amp;gt;child where&lt;br /&gt;
 # the Home link is added in Elements/Tabs.  The key for retrieving our new&lt;br /&gt;
 # Corporate link as above above would be &amp;#039;bps&amp;#039;.&lt;br /&gt;
 &amp;lt;/%init&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The objects returned by the functions &amp;lt;code&amp;gt;Menu()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PageMenu()&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;RT::Interface::Web::Menu&amp;lt;/code&amp;gt; instances.  Documentation for the &amp;lt;code&amp;gt;child&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;delete&amp;lt;/code&amp;gt; methods used above, plus more, is available by running &amp;lt;code&amp;gt;perldoc /opt/rt4/lib/RT/Interface/Web/Menu.pm&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Menus&amp;diff=2175&amp;oldid=prev</id>
		<title>Alexmv: Fix links</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Menus&amp;diff=2175&amp;oldid=prev"/>
		<updated>2012-01-12T22:43:22Z</updated>

		<summary type="html">&lt;p&gt;Fix links&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;There are three types of menus in RT4: the main menu, the page menu, and the page widgets.&lt;br /&gt;
&lt;br /&gt;
==Modifying Menus==&lt;br /&gt;
All of these menus can be altered, culled, and augmented by [[CustomizingWithCallbacks]]. The main RT menu can be modified from the &amp;quot;Menu&amp;quot; object in the callback. Here is an example of adding a new root menu item to RT:&lt;br /&gt;
&lt;br /&gt;
=== local/html/Callbacks/*/Elements/Tabs/Privileged ===&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%init&amp;gt;&lt;br /&gt;
 # Add a brand new root menu item&lt;br /&gt;
 my $bps = Menu()-&amp;gt;child(&lt;br /&gt;
     &amp;#039;bps&amp;#039;, # any unique identifier&lt;br /&gt;
     title =&amp;gt; &amp;#039;Corporate&amp;#039;,&lt;br /&gt;
     path  =&amp;gt; &amp;#039;[http://bestpractical.com http://bestpractical.com]&amp;#039;&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 #Add a submenu item to this root menu item&lt;br /&gt;
 $bps-&amp;gt;child(&lt;br /&gt;
     &amp;#039;wiki&amp;#039;,&lt;br /&gt;
     title =&amp;gt; &amp;#039;Wiki&amp;#039;,&lt;br /&gt;
     path  =&amp;gt; &amp;#039;[http://wiki.bestpractical.com http://wiki.bestpractical.com]&amp;#039;,&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 #Retrieve the &amp;#039;actions&amp;#039; page menu item&lt;br /&gt;
 if (my $actions = PageMenu-&amp;gt;child(&amp;#039;actions&amp;#039;)) {&lt;br /&gt;
     $actions-&amp;gt;child(&lt;br /&gt;
         &amp;#039;newitem&amp;#039;,&lt;br /&gt;
         title =&amp;gt; loc(&amp;#039;New Action&amp;#039;), path =&amp;gt; &amp;#039;/new/thing/here&amp;#039;,&lt;br /&gt;
     )&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # Remove the &amp;#039;home&amp;#039; root menu item (don&amp;#039;t try this at home!)&lt;br /&gt;
 Menu-&amp;gt;delete(&amp;#039;home&amp;#039;);&lt;br /&gt;
 &amp;lt;/%init&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexmv</name></author>
	</entry>
</feed>