<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<p>The links in the navigation bar are defined an array called <i>$MAIN_MENU</i>
which is populated during start-up, using <i>AppConfig[:pui_hide]</i>
options to determine which of the standard links to include.</p>
<p><br>
</p>
<p>You can make adjustments to it in your plug-in's <i>public/plugin_init.rb</i>
file (if that doesn't exist yet create it as a blank file.)</p>
<p><br>
</p>
<p> To add a new link on the end, use this:</p>
<p><br>
</p>
<p><i><a class="moz-txt-link-freetext" href="Plugins::add_menu_item(">Plugins::add_menu_item(</a>"path_on_server_or_full_url", "Label")</i></p>
<p><br>
</p>
<p>To add one at the start use:</p>
<p><br>
</p>
<p><i><a class="moz-txt-link-freetext" href="Plugins::add_menu_item(">Plugins::add_menu_item(</a>"</i><i>path_on_server_or_full_url</i><i>",
"Label", 0)</i></p>
<p><br>
</p>
<p>There is no ready-made method for re-ordering existing links, but
you could do it with something like the following, for example to
swap the 2nd and 4th links:</p>
<p><br>
</p>
<p><i><a class="moz-txt-link-freetext" href="ArchivesSpacePublic::Application.config.after_initialize">ArchivesSpacePublic::Application.config.after_initialize</a> do</i><i><br>
</i><i> $MAIN_MENU[1],$MAIN_MENU[3]=$MAIN_MENU[3],$MAIN_MENU[1]</i></p>
<p><i>end</i><br>
</p>
<p><br>
</p>
<p>Directly modifying a global variable like that would be a bad
thing for a third-party plug-in to do. But for your local plug-in,
customizing your implementation, it should be OK. Just remember
that if you change your config.rb in the future, you might have to
modify your plug-in too, otherwise it could break the public user
interface. But this method runs on the server, during start-up, so
is the most efficient option.<br>
</p>
<p><br>
</p>
<p>Andrew.</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 12/03/2021 19:27, Corey Schmidt
wrote:<br>
</div>
<blockquote type="cite" cite="mid:BN6PR02MB3156610AD48301DC67A836A5F36F9@BN6PR02MB3156.namprd02.prod.outlook.com">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Good afternoon all,<br>
<br>
I'm forwarding this message that a colleague of mine sent to the
Google Group, hoping to catch more bites here. Any advice/info
would be appreciated. Thanks!<br>
<br>
<blockquote style="border-color: rgb(200, 200, 200);
border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex;
margin-left: 0.8ex;" itemscope="" itemtype="https://schemas.microsoft.com/QuotedText">
We're using ArchivesSpace 2.7.1 and have been using the local
plugin overrides to customize. I've been successful in
suppressing items through the config file and relabeling using
the localizations, but I can't figure out how to change the
order that the links in the nav bar appear in. Anybody know
how to do this? I can't seem to find the relevant file.
Currently we've got a local copy of
plugins\local\public\views\shared\_navigation.html.erb that we
are working with, and I see where it looks like it's
constructing the nav bar and links, but I'm not sure what the
underlying file is that I need to target to change it.<br>
</blockquote>
<br>
My colleague suspects that control of the order of the links in
the nav bar exists outside of the local plugins architecture
because it's under the config folder filepath
(/public/config/initializers/public_new_defaults.rb?), which the
documentation on the local plugin says isn't one that LP
includes.<br>
<br>
Thanks,<br>
<br>
Corey<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Verdana, Geneva, sans-serif;
color: rgb(0, 0, 0);">Corey Schmidt</span></div>
<div style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Verdana, Geneva, sans-serif;
font-size: 11pt; color: rgb(51, 51, 51);">ArchivesSpace
Project Manager</span></div>
<div style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Verdana, Geneva, sans-serif;
font-size: 11pt; color: rgb(51, 51, 51);">University
of Georgia Special Collections Libraries</span></div>
<div style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Verdana, Geneva, sans-serif;
font-size: 10pt; color: rgb(102, 102, 102);"><i>Email:</i></span><span style="font-family: Verdana, Geneva, sans-serif;
font-size: 10pt; color: rgb(102, 102, 102);">
<a class="moz-txt-link-abbreviated" href="mailto:Corey.Schmidt@uga.edu">Corey.Schmidt@uga.edu</a></span><br>
</div>
</div>
</div>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Archivesspace_Users_Group mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a>
<a class="moz-txt-link-freetext" href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a>
</pre>
</blockquote>
</body>
</html>