Quantcast
Channel: Recent posts across whole site
Viewing all articles
Browse latest Browse all 49212

Buttons on Nodes

$
0
0

I'm looking for a way to add a button to the end of a node that actually does something.

Rendering the button is easy:

<?php
function button_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch (
$op) {
    case
'view':
     
$node->content['button'] = array(
       
'#type' => 'button',
       
'#value' => t('A Button!'),
      );
    break;
  }
}
?>

The hard part is getting the button to DO something!

....

Glenn


Viewing all articles
Browse latest Browse all 49212

Trending Articles