<?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=BypassLocalComponent</id>
	<title>BypassLocalComponent - 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=BypassLocalComponent"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=BypassLocalComponent&amp;action=history"/>
	<updated>2026-08-24T08:22:35Z</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=BypassLocalComponent&amp;diff=394&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=BypassLocalComponent&amp;diff=394&amp;oldid=prev"/>
		<updated>2016-04-06T20:03:21Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I would like to create a mason Local component (/opt/rt3/local/html/[[MyComp]]) that will decide to either handle the request or pass it off to the original component (/opt/rt3/share/html/[[MyComp]]) to handle.&lt;br /&gt;
&lt;br /&gt;
For example, you might want the component /Ticket/Create.html to be drastically different for just one queue, but appear as normal for all other queues. You don&amp;#039;t want to include the code/html for both version in one component. If you did it that way you would have to update your component every time Create.html changes in the standard RT distribution.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s how to do this:&lt;br /&gt;
&lt;br /&gt;
# Read [http://www.masonhq.com/?FAQ:Components#h-when_using_multiple_component_roots__is_there_a_way_to_explicitly_call_a_component_in_a_specific_root_ this] entry of the Mason FAQ.&lt;br /&gt;
# Install perl module: [=perl -MCPAN -e &amp;#039;install [[MasonX]]::Request::[[ExtendedCompRoot]]&amp;#039;]&lt;br /&gt;
# In [[RT SiteConfig|RT_SiteConfig]].pm:&lt;br /&gt;
&lt;br /&gt;
 @MasonParameters = (request_class  =&amp;amp;gt; &amp;#039;MasonX::Request::ExtendedCompRoot&amp;#039;,&lt;br /&gt;
                     resolver_class =&amp;amp;gt; &amp;#039;MasonX::Resolver::ExtendedCompRoot&amp;#039;) unless (@MasonParameters);&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;mkdir /opt/rt3/local/html/Ticket&amp;lt;/code&amp;gt;&lt;br /&gt;
# vi /opt/rt3/local/html/Ticket/Create.html with content:&lt;br /&gt;
&lt;br /&gt;
 % if ($ARGS{Queue} == 1) {&lt;br /&gt;
 &amp;amp;lt;&amp;amp;amp; standard=&amp;amp;gt;/Ticket/Create.html, %ARGS &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
 % $m-&amp;amp;gt;abort;&lt;br /&gt;
 % }&lt;br /&gt;
 This is not the component your are looking for. (Jedi mind tricks. he, he)&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;mkdir /opt/rt3/local/html/Elements&amp;lt;/code&amp;gt;&lt;br /&gt;
# vi /opt/rt3/local/html/Elements/[[SelectOwner]] with content:&lt;br /&gt;
&lt;br /&gt;
 Pick me! Pick me!&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Try to create a ticket in queue with id 1. Notice how SelectOwner is from local but Create.html is from share? Try to create a ticket in queue with id &amp;amp;gt; 1. Not happening!&lt;br /&gt;
&lt;br /&gt;
See the [[MasonX]]::Request::[[ExtendedCompRoot]] documentation for more fun.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>