This is my first Drupal site, and am still very much in the learning process. I would like to add a tabbed box to a contemplate page to help reduce the page length. I have things like:
<h3>Date of Appeal</h3><?php print $node->field_appeal_date[0]['view'] ?>
<h3>Appeal Details</h3><?php print $node->field_appeal_details[0]['view'] ?>
etc, in the contemplate template. I would like to move those and several other fields into a tabbed box, but after several hours trying I am at a loss on how to have my magic_tabs_tml_callback() function in template.php add this information to $tabs['content']. I can modify the static text without issue. Could you provide an example of how to accomplish this? If Magic_Tabs is not set up to do this, could you suggest an alternate approach to achieve a similar result?
Thanks in advance.
Comments
Comment #1
yhager commentedRun this code on the callback:
And now you can use the $node object like you specified above.
Comment #2
Balefire commentedThank you for that, I was soo close to that several times but couldn't get it to work properly. There was a small issue of it not giving me ['view'], and I tried node_view($node) which gave me a WSOD each time. With a bit of experimenting and reading, I found that node_build_content($node) gives me ['view']. Which I hope is correct.
I now have:
I realise there is probably more error checking, etc to do but at least the basics are working now! Cheers.
Comment #3
yhager commentedGreat!
Happy Drupaling :)