Miriam Posted February 4, 2005 Posted February 4, 2005 I just re-designed a site using MT to incorporate news articles. I've been able to incorporate the "headlines" in a sidebar that displays on every page. What I can't figure out how to do is get the actual full articles into an iFrame so that they maintain the same look as the rest of the site. I need some help figuring out how to call these pages when the permalink in the side bar is clicked so I can put it in the url call in the iFrame. Here's the site: Fair Oaks Chamber of Commerce Thanks, Miriam Note: I put the Member Directory and the Calendar in iFrames ok, I just can't figure out the MT tags and how to use them. Quote
TCH-RobertM Posted February 4, 2005 Posted February 4, 2005 Miriam , I am sorry I do not know the answer to your question but I am sure another family member might be able to help you out soon. hang in there Quote
Samrc Posted February 4, 2005 Posted February 4, 2005 Standard Iframe code is: ><iframe name="FRAMENAME" src="contentpage.htm" width="100" height="280" frameborder="0"></iframe> For example: ><iframe name="FRAME1" src="contentpage.htm" width="100" height="280" frameborder="0"></iframe> This code is placed on the page where you want your iframe window. Then you create a page with your stories, your content page. The Iframe will display the contents of the content page. Code notes: Iframe name = Name of the frame (call it anything you want) No spaces, no symbols except - and _ Multiple iframes: each iFrame needs a different name src = Address of the Contents page that you want to see in the iframe (This is the other page seen through the iframe window when you load the page.) The iframe will begin by displaying this page through the window. width and height = Enter number of pixels for the iframe window "730" Or enter the percentage for the window size "80%" frameborder = 1 causes a 3d edge on the iFrame window. Using 0 makes the edge invisible. There are other settiings like scrollbars, transparency, etc. but you probably won't need them. If you name your Iframe "FRAME1", then your links to change the content of that iframe will use the TARGET to that frame and will look like this: SIMPLE TEXT LINK HTML CODE - Absolute link: story 1 ><A href="http://www.domain.com/story1.htm" target="FRAME1">Story 1</A> SIMPLE TEXT LINK HTML CODE - Absolute link with a floating tooltip: story 2 ><A href="http://www.domain.com/story2.htm" target="FRAME1" title="This story is very interesting">Story 2</A> If you need to link to anchors on your content page, then your link would look like this: ><A href="http://www.domain.com/contentpage.htm#story1" target="FRAME1">Story 1</A> Haven't tried to display MT in an iframe, but if the content page contains the data then it should view through the iframe. I have had iframes display other iframes. Good Luck. -Samantha Quote
Miriam Posted February 4, 2005 Author Posted February 4, 2005 Wow, thanks for such a wonder tutorial on iFrames! I'm sure many will find this very useful. My question about putting the MT output into an iFrame is that MT automatically generates the output, and I'm not sure how to access that information. Miriam Quote
AlanV Posted February 4, 2005 Posted February 4, 2005 Make MT generate content onto a page other than index.html Then, make your index.html page a static page, and stick the MT-generated page in an iframe on your index. Quote
Samrc Posted February 5, 2005 Posted February 5, 2005 Hope the info helps. I have more on Iframes here: http://www.samisite.com/test-csb2nf/id43.htm (including how to use transparency, hover and linking to multiple iframes at once). I culled the items above from my iframe page to give you the basics in my forum post. -Samantha Quote
Miriam Posted February 5, 2005 Author Posted February 5, 2005 I gave up on trying to use an iFrame for the MT content. Instead I thought I'd try to get my site template into the MT template itself. After much pulling of hair and gnashing of teeth trying to put my template information directly into the MT templates, and getting many error messages which I couldn't decipher, I decided to try going the other way. I created a new blank document in Dreamweaver MX2004 and applied my template to it. I then copied what I hoped were the pertinent sections of the MT template into the document. I made sure all links to images and navigation were absolute not relative. Then I copied the source code for the file and pasted it into the appropriate MT template. With a little more tweaking, it worked! I followed the same procedure for the other templates I needed. So I didn't use iFrames after all. I "wrapped" my Dreamweaver site template around the MT code. And it only took me about 6 hours. Miriam Quote
Samrc Posted February 6, 2005 Posted February 6, 2005 Excellent! Sounds like a better plan actually. -Samantha Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.