<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Yes, thank you. That answers my question. I had to re-think my
approach. For others who stumble with this as I have, the solution is
to write your own callbacks customized to process the wildcard value
and return the value you want. That's what I did below with
'agenda_page_title' and '_agenda_list':<br>
<div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span
style="color: rgb(0, 0, 187);"><br>
<?php<br>
</span><span style="color: rgb(0, 119, 0);">function </span><span
style="color: rgb(0, 0, 187);">agenda_menu</span><span
style="color: rgb(0, 119, 0);">() {<br>
</span><span style="color: rgb(0, 0, 187);">$items </span><span
style="color: rgb(0, 119, 0);">= array();<br>
<br>
</span><span style="color: rgb(0, 0, 187);">$items</span><span
style="color: rgb(0, 119, 0);">[</span><span
style="color: rgb(221, 0, 0);">'node/agenda/list/%node'</span><span
style="color: rgb(0, 119, 0);">] = array(<br>
</span><span style="color: rgb(221, 0, 0);">'title callback' </span><span
style="color: rgb(0, 119, 0);">=> </span><span
style="color: rgb(221, 0, 0);">'agenda_page_title'</span><span
style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(221, 0, 0);">'title arguments' </span><span
style="color: rgb(0, 119, 0);">=> array(</span><span
style="color: rgb(0, 0, 187);">3</span><span
style="color: rgb(0, 119, 0);">, </span><span
style="color: rgb(221, 0, 0);">'List agenda items for: '</span><span
style="color: rgb(0, 119, 0);">),<br>
</span><span style="color: rgb(221, 0, 0);">'page callback' </span><span
style="color: rgb(0, 119, 0);">=> </span><span
style="color: rgb(221, 0, 0);">'_agenda_list'</span><span
style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(221, 0, 0);">'page arguments' </span><span
style="color: rgb(0, 119, 0);">=> array(</span><span
style="color: rgb(0, 0, 187);">3</span><span
style="color: rgb(0, 119, 0);">),<br>
</span><span style="color: rgb(221, 0, 0);">'access callback' </span><span
style="color: rgb(0, 119, 0);">=> </span><span
style="color: rgb(221, 0, 0);">'user_access'</span><span
style="color: rgb(0, 119, 0);">,<br>
</span><span style="color: rgb(221, 0, 0);">'access arguments' </span><span
style="color: rgb(0, 119, 0);">=> array(</span><span
style="color: rgb(221, 0, 0);">'view agenda'</span><span
style="color: rgb(0, 119, 0);">),<br>
</span><span style="color: rgb(221, 0, 0);">'type' </span><span
style="color: rgb(0, 119, 0);">=> </span><span
style="color: rgb(0, 0, 187);">MENU_CALLBACK<br>
</span><span style="color: rgb(0, 119, 0);">);<br>
<br>
return </span><span style="color: rgb(0, 0, 187);">$items</span><span
style="color: rgb(0, 119, 0);">;<br>
}<br>
<br>
function </span><span style="color: rgb(0, 0, 187);">_agenda_list</span><span
style="color: rgb(0, 119, 0);">(</span><span
style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">) {<br>
return </span><span style="color: rgb(0, 0, 187);">agenda_list</span><span
style="color: rgb(0, 119, 0);">(</span><span
style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">-></span><span
style="color: rgb(0, 0, 187);">nid</span><span
style="color: rgb(0, 119, 0);">);<br>
}<br>
<br>
function </span><span style="color: rgb(0, 0, 187);">agenda_page_title</span><span
style="color: rgb(0, 119, 0);">(</span><span
style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">, </span><span
style="color: rgb(0, 0, 187);">$text</span><span
style="color: rgb(0, 119, 0);">) {<br>
</span><span style="color: rgb(0, 0, 187);">$return </span><span
style="color: rgb(0, 119, 0);">= </span><span
style="color: rgb(0, 0, 187);">$text </span><span
style="color: rgb(0, 119, 0);">. </span><span
style="color: rgb(0, 0, 187);">$node</span><span
style="color: rgb(0, 119, 0);">-></span><span
style="color: rgb(0, 0, 187);">title</span><span
style="color: rgb(0, 119, 0);">;<br>
return </span><span style="color: rgb(0, 0, 187);">$return</span><span
style="color: rgb(0, 119, 0);">;<br>
}<br>
</span><span style="color: rgb(0, 0, 187);">?></span></span></code></div>
<br>
Jakob Petsovits wrote:<br>
<blockquote cite="mid200802152223.38534.jpetso@gmx.at" type="cite">
<pre wrap="">On Friday, 15. February 2008, Ron Parker wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Chris Johnson wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Um, array(3)->nid is not valid PHP syntax. Is that what you really meant?
</pre>
</blockquote>
<pre wrap="">That's my question. I'm trying to figure out if the wildcard value can
be used in such a way. In my example, the wildcard is %node, which is
equal to ($node = node_load(arg(3)). array(3) is now equal to $node.
</pre>
</blockquote>
<pre wrap=""><!---->
No, array(3) is equal to (in print_r() syntax)
Array (
[0] => 3
)
and the menu system just uses this standard PHP array as callback argument in
order to get the real number (and from that, the node itself).
I mean, don't get me wrong - I understand your point, just make sure you
recognize that this isn't any special node system syntax but standard PHP.
wishes,
jakob
__________ NOD32 2880 (20080215) Information __________
This message was checked by NOD32 antivirus system.
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ron Parker
Software Creations <a class="moz-txt-link-freetext" href="http://www.scbbs.com">http://www.scbbs.com</a>
Self-Administration Web Site <a class="moz-txt-link-freetext" href="http://saw.scbbs.com">http://saw.scbbs.com</a>
SDSS Subscription Mgmt Service <a class="moz-txt-link-freetext" href="http://sdss.scbbs.com">http://sdss.scbbs.com</a>
Central Ave Dance Ensemble <a class="moz-txt-link-freetext" href="http://www.centralavedance.com">http://www.centralavedance.com</a>
R & B Salsa <a class="moz-txt-link-freetext" href="http://www.randbsalsa.com">http://www.randbsalsa.com</a>
</pre>
</body>
</html>