Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-12 21:03:26

kawazu
New Member
Registered: 2009-02-12
Posts: 2

displaying article content in iframe?

Folks;

first off, being new around here, “hello everyone”… stumbled across txp a few days ago searching for a modular yet lightweight CMS / framework to migrate an old page to (well, sort of). So far I am rather pleased seeing that getting started with txp is pretty straightforward and especially templating / theme’ing is very friendly here, which I whole-heartedly enjoy. However, there’s one small issue nagging me at the moment:

The site I am about to migrate features a given fixed-width layout yet carries some rather lengthy articles, at the moment utilizing iframe objects to keep the actual page content and allow users to scroll through this rather than having a dynamically scaling page. Despite personal objections against iframe’s, I have to admit not so far to have found a better solution to this problem. So, right now, my setup is like this:

- I do have a bunch of “sections” mainly having a general “layout” containing global (“sections”) as well as articles-per-section navigation. The page itself contains an iframe tag which the actual article body should be loaded to. I set up custom templates for the actual articles loaded to this iframe to make sure main navigation, … doesn’t appear once more inside the iframe. Last missing piece here: Whenever the user chooses a link off the articles navigation, I somehow need to set the iframes “src” element to point directly to the selected article; yet I am missing how to express this in txp tags (finding “just” permalinks to “next” article or “previous” article but not to “article currently selected”). Can someone eventually enlighten me how to get this done?

- As an alternative: How do you handle setups like this? Is there a better solution for including content into a scrollable page area in a fixed-height/size layout which still is a viable solution to use with txp and modestly current browsers (FF 1.x, MSIE 6 +)?

Thanks a bunch for your patience and, in advance, for any hints on that…
Cheers,
Kristian

Offline

#2 2009-02-12 22:03:22

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: displaying article content in iframe?

Welcome!

Use a div instead of an iframe and control the size and scrolling with CSS?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2009-02-13 01:31:53

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: displaying article content in iframe?

said in Neanderthal-like voice
iframe bad. CSS good.

MattD is right – just use overflow:auto on the div you want to scroll. – just be sure to also define height.

Welcome to TXP.

:)

Last edited by renobird (2009-02-13 01:32:21)

Offline

#4 2009-02-13 08:53:12

kawazu
New Member
Registered: 2009-02-12
Posts: 2

Re: displaying article content in iframe?

Folks;

thanks a bunch for your responses. :) Well… as so far I haven’t had to do any fixed-size page recently, I never stumbled across scrollable divs by now but indeed it seems the way to go. I’m off to get my homework done. ;)

Thanks again and all the best,
Kristian

Offline

Board footer

Powered by FluxBB