Hi im doing some web work for a church and need to know how to go about loading $content into an iframe, i have the front page module installed and got the front page to work fine.

I have 5 links on the front page and i would like them to load certain content into the iframe(also located on same page) from drupal. I dont need the whole page loaded just the content of created content nothing else. So basically instead of using drupal to display the content feed id like the iframe too.

does that make sense?

Comments

rood’s picture

anyone?

rood’s picture

someone has to have tried this...I have a custom front page and just want to push content to it, what do i need to do to go about doing that?

marcexx66’s picture

what's your problem using an iframe? I use iframes in drupal nodes without problems.

Drupal rocks!!

themphill’s picture

Even with static pages there are difficulties implementing iframes. If your goal is simply to have content in a container with its own scroll bar, you may wish to try something like this in your template:

<div class="frame"><?php print $content ?></div>

and in your style sheet:

div.frame
{
	width: 350px;
	height: 350px;
	overflow: scroll;
}
rood’s picture

here is what the site looks like, http://ktmfh.org/ the white area being the iframe, as you can see i have 5 links, i also have 5 nodes in drupal that contain the content i wish to display in the iframe for each of the links. How would i go about specifying & loading the content from these nodes?

rood’s picture

Im using this module here http://drupal.org/project/front the way it sounds to ME is that i can just drop variables into my front page and it will display the content of the pages...

heres a pic...of what im trying to explain...

http://ktmfh.org/demo.jpg

can someone please clear this up for me, what variables do i need to include?

im trying to just pulll content from different nodes into my iframe...

please note im not using any themes its a custom front page

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><?php print $head_title ?></title>
        <link href="ktmfh/stylesheet.css" rel="stylesheet" type="text/css" />
        
    <script language="javascript">
        function load(iframe1URL)
        {   
        parent.FRAME1.location.href=iframe1URL
        }
    </script>

        
        <style type="text/css">
            #events
            {
                margin-top: 1px;
            }
        </style>

        
    </head>
    <body>
    <center>

        <!-- content div -->
        <div id="wrapper">
           
           <!-- frame div -->
           <div id="content"><iframe id="frame" name="FRAME1" src="ktmfh/about.php" width="740" height="500" frameborder="0" scrolling="auto"></iframe>
           </div>
           
           <!-- navigation div -->
           <div id="navcontainer">
           <ul>
           <li id="about"><a href="javascript:load('ktmfh/about.php')"><img src="ktmfh/Aboutbutton.jpg" alt="About Us" /></a></li>
           <li id="ministries"><a href="javascript:load('ktmfh/ministries.php')"><img src="ktmfh/ministriesbutton.jpg" alt="Ministries"  /></a></li>
           <li id="watch"><a href="javascript:load('ktmfh/watch-listen.php')"><img src="ktmfh/watch-listenbutton.jpg" alt="Watch" /></a></li>
           <li id="events"><a href="javascript:load('ktmfh/events-calendar.php')"><img src="ktmfh/events-calendarbutton.jpg" alt="Events" /></a></li>
           <li id="contact"><a href="javascript:load('ktmfh/contact-directions.php')"><img src="ktmfh/contact-directionsbutton.jpg" alt="Contact" /></a></li>
           </ul>
           </div> 
           
           <div id="footer">
           <a href="http://ktmfh.org/?q=node/9">Key to my Father's House Church, share media and stories with others!</a>
           </div>
           
        </div>
        
    </center>
    </body>
    </html>

as you can see i have the print $head_title in their(which doesnt work). So how would i got about pulling in content from specific nodes?

rood’s picture

anyone?

rood’s picture

bump still need help....