1

I need help with solving following problem:

In my node content type (called "hotel") I'd like to add a custom link to the existing links which are put out via $content['links'].

The custom link shall only appear at the hotel content type.

What I have to do? What theme function do I have to modify and how?

thanks for any help.

phil

  • 1
    A quick search revealed this post. drupal.stackexchange.com/questions/19877/… – rreiss Aug 10 '13 at 18:34
  • Thanks a lot Rotem :) . This example works fine generally. But if I want to create a link with some $get parameters it don't work. For example: I want to create a link like "link-to-my-node?param1=value1". This is my PHP code: <code> function globewheeler_node_view_alter(&$build) { $build['links']['node']['#links']['add-hotel-image'] = array( 'title' => t('Upload a hotel image'), 'href' => 'node/add/hotelbild', 'html' => TRUE, 'attributes' => array( 'title' => t('Upload a new hotel image!'), 'query' => array('param1' => '10'), ), ); } </code> – dercheffe Sep 1 '13 at 13:51

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.