Help - Search - Members - Calendar
Full Version: If I put the entries in an iframe...
Movable Type Community Forum > Additional Resources > Tips and Tricks
2alonedotcom
I don't wanna put a huge scrollbar on my main page... and I want all my content to "seem to" being fitting in just one screen. To do this I will have to put the entries in an iframe. I figured since the entries content changes everyday, it wouldn't really matter to the search bots, and they spider the individual entries anyway.

Is that a good idea...? I mean will it interfere with any RSS feeds, the recently updated list at MT or anything...?

Note: I will only put the actually entries in the iframe, the archive links, blogroll, categories will still be outside.
kadyellebee
I've definitely seen MT blogs do this, so its not impossible. smile.gif

There have been several threads around here about the special things to watch for when setting up an iframe layout. In one of the threads I've helped on, permalinks were mentioned as a problem, because if someone links to your entry, it might link to just the inner page instead of the full page.

So search the forums, and I bet you'll find more info smile.gif

Kristine
2alonedotcom
QUOTE (kadyellebee @ Jul 27 2003, 09:09 AM)
In one of the threads I've helped on, permalinks were mentioned as a problem, because if someone links to your entry, it might link to just the inner page instead of the full page.

I already have a solution for that problem:

A little Javascript that can check if the page is being loaded as part of a frameset or am inline frame, if not, the page automatically reloaded with the framed page. Combine this with a php var to carry the entries name, and it should load the frontpage with the requested entry enclosed in an iframe.

smile.gif
elph
I've got somewhat the same issues. I was thinking about making my page an I Frame layout. Even with Javascript and PHP vars I just didn't like the feel and the unstableness of it. I did find however that instead of having the content be in an Iframe to have the navigation be in the iframe and the content be the "frame" instead. Mix that with some creative CSS-P and have the relevant nav pages load depending on each page and you're set. You can get it to work by having the links inside the Nav I Frame to be:
CODE
<a href=" normal href stuff here " target=_parent>Blah Blah</a>


Now for ease of viewing I took away my boxy designs and I'm just going for a 1 page 1 frame kinda view. It's only when you get to my none MT related areas that I wanted it to still feel the same.
Jai
*Cringes at Iframe for just keeping the page from scrolling*...

Place your blog entries in a div tag and give them the scroll property. This way you won't have to use frames and old browsers will still render a long page (otherwise, old browsers would make your page look like there is no content- thus is the nature of the iframe).

Here's an example:


CODE
<div style="background-color:#FFFFFF; width:450; height:500; overflow: scroll"> All of your MTtags and stuff for the entries go here </div>


This would give you a 450px wide by 500px high div that looks exactly like an iframe. Anytime the stuff in the div gets higher than 500, it sets a scrollbar. Also, the background I set is #ffffff (white).

For more info on this kind of thing, see this example

~Jai
stepsxfan1
If you use the div way instead of an Iframe, is there any way of making the bottom scrool bar and side one vanish and having some sort of arrow scroll like on this site?

http://www.fayetozer.net/index2.php

I have the script for the scroll.

If anyone can think of a solution, it would be greatly appreciated.

Love and hugs
Vicky
xx
kadyellebee
Stepsxfan1 - I've used scrollers like that in a blog design before... I really like the script at DHTML central called Scroll Text. You'll just want to make sure and put the scrolling script outside of the MTEntries container on any of the templates that you are using. smile.gif

For some reason, I was thinking that the overflow property that Jai talks about didn't work in IE6, but I opened up the test page, and it seems to... You might want to check out Opera and maybe Mac browsers to make sure it works everywhere. smile.gif

Kristine
avarweth
The div with overflow option works just fine in Opera 7. smile.gif
Jai
The advantage to the overflow property is that when it doesn't work, you still see all of the content (just in a "long-hand" version- such as NS4x [shudders at mention of NS4x]).

I'm not sure, since I've not really ever been concerned with the horizontal scroll, but I think if you eliminate the width property and drop your overflow div into another div with a width property, you'll kill the horizontal scroll. Try it, let me know. smile.gif
diagonalwalls
Hi! biggrin.gif

QUOTE
If you use the div way instead of an Iframe, is there any way of making the bottom scrool bar and side one vanish and having some sort of arrow scroll like on this site?


Yes. Change the overflow attribute from "scroll" to "auto"

CODE
<div id="BlogContent" style="position:absolute; width:540px; height:370px; z-index:1; left: 40px; top: 102px; overflow: auto;" class="ContentText">


The above is from a older site of mine and it works in NS and IE. Obviously, you'd have to change the variables. but I wanted to show you the overflow tag "in situ." This removes the bottom scrollbar *and* only adds a scrollbar when the content "needs" to scroll.

Also, IFRAMES: Icky. tongue.gif

Have fun!
KW
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.