I'd like to add a button to every of my article pages, that would open a box containing an iframe code embedding for example the title, the content and the image of the article in another page. Does it already exist a module doing this? I tried Iframe and Entity Iframe, couldn't get what I want though.

Thanks for your help.

  • Why would you insist it has to be iframe? – Mołot Dec 4 '14 at 15:40

In your node--contenttype.tpl.php you can add a div (optionally with a textbox) which is hidden by default and fill it dynamically with the title and content of your node. Create a button that uses the colorbox module to show that div when pressed and your done.

      <h2><?php echo $node->title;?></h2>

Alternatively you could just use javascript to copy the content of your page to a div when the button is pressed.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.