I got a "normal" node that contains some simple text content like this:

This is how our internship program work .....

After that text I want to include a list of our current team members. I can reuse existing PHP code for that. It gets the data from taxonomy.

I am new to Drupal, so I don't know a lot about it yet. But I can call that PHP code with a hook like this

function my_custom_menu() {
  $items['internship'] = array(
    'type' => MENU_CALLBACK,
    'title' => 'Internship',
    'access arguments' => array('access content'),
    'page callback' => 'my_custom_page_internship',
  return $items;

But how can I combine both: the node and PHP code to show it as one?

  • Do you have a specific need to be in PHP? What you trying to do sounds like you can do allready out of the box with a view – Rick B Oct 13 at 12:24
  • It does not have to be PHP. I just thought of reusing it. But if there is no need for it ... – juergen d Oct 13 at 12:24
  • 1
    Then I suggest to make a new view with views. Select as base content your taxonomy. Add as header your content "This is how our internship program work ....." and you're done. – Rick B Oct 13 at 12:26
  • That seems to work generally. Great! How would I configure that so that not all teams members but only the ones under a specific group are displayed? – juergen d Oct 13 at 12:39
  • 1
    You can add filters under 'filter criterea' I recommend reading the docs to ge quickly up to speed with views: drupal.org/docs/7/modules/views/what-are-views – Rick B Oct 13 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.