John, I am imagining that I want to add my links to the render array using hook_node_view_alter() right before the rendering is done. What I don't know how to do is add something to the render array. Does this sound right? -- Alex Adams hawkVision building highly agile worlds of knowledge A2 Technology Partners, Inc. 831-724-1397 alex@a2technology.com www.a2technology.com
From: John Fiala <jcfiala@gmail.com> Reply-To: <development@drupal.org> Date: Thu, 7 Jul 2011 11:30:16 -0600 To: <development@drupal.org> Subject: Re: [development] Links in node view
On Thu, Jul 7, 2011 at 11:08 AM, Alex Adams <alex@a2technology.com> wrote:
I need to add a link as a rendered array to node views. I have accomplished this from a page. The link calls an AJAX function and refreshes a custom module block. Now I need to put a series of links in node views. These will add records to module generated database tables based on the contents of $node, specifically $nid, then refresh a block that will reflect the new record.
I am learning much about Drupal 7. I am an experienced developer, but Drupal is so complex, that I seem to be struggling with every step. It took me an embarrassingly long time to figure out how to refresh a block from a content page link.
Can someone give me the basics (or specifics) I need to accomplish this next step?
If you want to add content to the node display, I would look at the hook 'hook_node_view' (http://api.drupal.org/api/drupal/modules--node--node.api.php/function/hook_n... de_view/7) The whole purpose of this hook is to add content to the display of a node.
-- John Fiala www.jcfiala.net