<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #000000"><div>Hi Folks,<br></div><div><br></div><div>I defined a call to hook_menu and I created a path "modc/ajax/%node" (see below) with the attendant callback, "modc_ajax_node($node)". I am requesting the menu entry from a view by rewriting a title field as a link: "modc/ajax/[nid]".<br></div><div><br></div><div>So far, so good. All the plumbing works, for the most part.<br></div><div><br></div><div>First mystery: In my callback function, modc_ajax_node($node), I <u><strong>expected</strong></u> $node to be an integer because I think I told the view to use that replacement pattern, [nid], however var_dump($node) reveals it to be a fully developed structure that, with my level of experience, I can't distinguish from the internal representation of a node, and in fact it appears to be the correct node, guessing by what I see in the fields.<br></div><div><br></div><div>Second mystery: O.K., so let's suppose that I have an internally represented node, and I want to display it. Shouldn't: return render($node): produce a display of the page?
... because it doesn't. So, I expect I am calling the wrong thing.
Can anybody tell me how I convert the internal representation of a node
to the printable HTML that I need? P.S.: If my modc_ajax_node($node) callback executes: return "<P>Hi!</P>"; then I see a fully rendered page showing the title, 'Module C AJAX node callback', with content "Hi!", just as expected. </div><div><br></div><div><span name="x"></span>Chris.<br></div><div><br></div><h1>...created a path to "modc/ajax/%node":<br></h1><div> $items['modc/ajax/%node'] = array (<br> 'title' => 'Module C AJAX node callback',<br> 'page callback' => 'modc_ajax_node',<br> 'page arguments' => array(2),<br> 'access arguments' => array('access content'),<br> 'type' => MENU_CALLBACK,<br> );<br></div><div><br></div><div><br class="r"></div><div><br></div><div><br></div><div style="position: absolute; left: -40px; top: -25px; width: 1px; height: 1px; overflow: hidden;" data-mce-bogus="1" class="mcePaste" id="_mcePaste"></div></div></body></html>