<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-AU link=blue vlink=purple>
<div class=Section1><pre>Jonathan,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Thanks a lot for the below tip. It’s a month old now but finally I got around to doing it – and it worked! The only trick was that I had to store $_GET['q'] in a variable before changing the active item else it wouldn’t change back correctly. I now wrote a bit of complicated code to get all the right secondary links menus appearing at the right time.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>The only further thing that would be great is to be able to set the desired menu items as “active” in primary and secondary links. I’ve seen a few people talking about how to do this on drupal.org but it inevitably involves regexp string matching... yuk... and there are different techniques anyway. Does anyone know the “best way” to do this in D6?<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>By the way Jonathan, you appear to cryptographically sign your messages and I find that with MS lookOut (in digest mode – all messages come as attachments to one message) I can’t read your messages. I had to go to the online list archive to read your response. Not sure if this is just an Outlook issue but anyway thought you should know.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Regards,<o:p></o:p></pre><pre>John<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>John Fletcher wrote:<o:p></o:p></pre><pre>><i><o:p> </o:p></i></pre><pre>><i> Is there a way to instruct Drupal 6 to show a certain menu without<o:p></o:p></i></pre><pre>><i> actually putting the node you are viewing into that menu?<o:p></o:p></i></pre><pre>><i><o:p> </o:p></i></pre><pre>><i> <o:p></o:p></i></pre><pre>><i><o:p> </o:p></i></pre><pre>><i> I’m using primary links as the source of secondary links and I’d like<o:p></o:p></i></pre><pre>><i> to instruct Drupal that “this node I’m viewing is associated with this<o:p></o:p></i></pre><pre>><i> menu item” so that the correct combination of primary and secondary<o:p></o:p></i></pre><pre>><i> links is displayed. I can achieve this by just putting all the<o:p></o:p></i></pre><pre>><i> relevant nodes as third-level menu items, but then I’ve got a LOT of<o:p></o:p></i></pre><pre>><i> stuff in my menu (I’ve got about 700 nodes).<o:p></o:p></i></pre><pre>><i><o:p> </o:p></i></pre><pre>On the relevant pages, you can do the following to construct the menu<o:p></o:p></pre><pre>for a different path (say, for example, node/7) in template.php (in your<o:p></o:p></pre><pre>theme_preprocess_page() function).<o:p></o:p></pre><pre> <o:p></o:p></pre><pre><o:p> </o:p></pre><pre> menu_set_active_item('node/7');<o:p></o:p></pre><pre> <o:p></o:p></pre><pre> // build secondary links<o:p></o:p></pre><pre> $vars['secondary_links'] = menu_secondary_links();<o:p></o:p></pre><pre><o:p> </o:p></pre><pre> // reset active item<o:p></o:p></pre><pre> menu_set_active_item($_GET['q']);<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Cheers,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Jonathan<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>-- <o:p></o:p></pre><pre>Jonathan Hedstrom OpenSourcery<o:p></o:p></pre><pre><a
href="http://opensourcery.com">http://opensourcery.com</a> Technology for Good<o:p></o:p></pre>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>