Include a link
gapi78 - June 6, 2008 - 20:32
Hi,
im new to drupal and im loving it more every minute, but i have a question. For a project that im involved i need a link in the menu on the left (that's not a problem) and that link should open on the right (like for default links) but that link is realy anoter page from another server. I would like it to be included like in php when you include pages or links by include().
Hope i made it easy to understand.
thanks for an answer

Custom module may be needed
Summing up, you want to embed the content of a remote http address within the content area of your drupal site and have menu links?
Check the forums and the module list for existing solutions, but I think you will need a custom node type. (Great intro to Drupal but requires php skills)
Two approaches are;
Custom code it from scratch, and add a field called link. Using page_view hook, use file_get_content or similar to download the remote page and embed it into a iframe that is outputted into the page.
Easier, but still hard for newbs:
1) Create a new content type, say "offsite_page"
2) Use CCK to add a textfield for the link, call it "offsite_page_url"
3) Theme the node using the file "node-offsite_page.tpl.php" within your themes dir
This should have a variable called (something like) $node->field_offsite_page_url[0] that contains the link. (Do a var_dump on the $node to get the correct structure)
Use
<?php @file_get_content($node->field_offsite_page_url[0]); ?>to get the external page, and insert that into a div/iframe or whatever.Take things one step at a time, using the docs/forums for help.
Alan Davison
www.caignwebs.com.au