Call me old school, but calling the same function with the same argument twice in a row is wasteful. I see this tendency to just call the same thing a lot rather than storing it in a variable and reusing it, and I don't like it.<br>
<br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">$a0 = arg(0);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$a1 = arg(1);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$path = "$a0/$a1";</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">drupal_set_message('stuff' . $path);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$variables['nancy'] = $hook . $path;</span><br style="font-family: courier new,monospace;"></div><br>This does not address why you are seeing what you are seeing. Use a debugger like xdebug to see what really is going on there.<br>
<br><div class="gmail_quote">On Thu, Jan 14, 2010 at 10:49 AM, Nancy Wichmann <span dir="ltr"><<a href="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size: 12pt;">I’m
working on a hook_preprocess_page and it seems to be behaving strangely. I
have:</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; font-family: "Courier New";">
drupal_set_message(‘stuff ‘. arg(0) . ‘/’ . arg(1));</span></p>
<p class="MsoNormal"><span style="font-size: 12pt; font-family: "Courier New";">
$variables[‘nancy’] = $hook . arg(0) . ‘/’ . arg(1);</span></p>
<p class="MsoNormal"><span style="font-size: 12pt;">In
exactly that order, with no intervening lines.</span></p>
<p class="MsoNormal"><span style="font-size: 12pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 12pt;">Displaying
the variable in the page.tpl.php shows “page taxonomy/term” but the
message shows “stuff r/ms” (even if I refresh the page, or clear the
cache). How can this be happening?</span></p>
<p class="MsoNormal"><span style="font-size: 12pt;"> </span></p>
<p class="MsoNormal"><span style="font-size: 12pt;"> </span></p>
<div>
<p class="MsoNormal"><span style="font-size: 14pt; font-family: "Comic Sans MS"; color: fuchsia;">Nancy E. Wichmann, PMP </span> </p>
</div>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Courier New";">Injustice
anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr</span><span style="font-size: 10pt;">.</span></p>
<p class="MsoNormal"> </p>
</div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. -- Leonardo da Vinci<br>