Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

All the docs and answers i read about render arrays dive into the deep before learning to swim. Very frustrating, I would like to have a minimal example.

Assuming this is a valid render array (correct me if its wrong or if it can be smaller)

$rarr = array(
    'whoopie'=>array(
         'foo'  => $bar,
         '#theme'   => 'quz'
    )
);
  • where does 'whoopie' go ? is it used at all ?
  • how would I define the theme 'quz' using HOOK_theme
  • for each possible 'render element' in the definition

    • how would a method receive the variable $bar ?
    • how would a template receive the variable $bar ?

Please, dont get into too much details. What I want is a working absolutely minimal example.

thanks,

*-pike

share|improve this question
 
sofar, i've gotten 5 upvotes and 2 downvotes on the question, but no answers :-) –  pike Jul 12 '13 at 10:46
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.