Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

iframes and SilverStripe - and some other thoughts


Reply


2 Posts   1167 Views

Avatar
steve_nyhof

Community Member, 224 Posts

19 May 2008 at 5:34am

Edited: 19/05/2008 5:39am

I am hoping that SilverStripe can be used for my needs. Can anyone tell me if the following things can be accomplished with SilverStripe... Some of these I know it can, but I will just give you my list...

Most of my sites are designed with tables and css. I am looking forward to removing the tables and think I should be able to get the same look.

Very common header, typically a top and 2nd level side navigation and content area.

Under the side navigation I typically have the name, address and contact info...
(can this be added as a widget that my clients can edit?)

iFrames (I know - a bad word) but I haven't figured out a work-a-round yet. From what I see in SilverStripe, there might be a way???
I have tried the iframe code talked about on the form but can't get it working (I'm sure I will) but I have more than just a call to an external file, see below...

This is what I use as it allows users to access the correct site and listing page from clicking on a link in an email sent to them or a friend... Continued below...

<IFRAME title="Home and property listings" id=myFrame frameBorder=0 width=100% height=2000></IFRAME>
<script>
function decodeQuery(query)
{
var params = {}; // prepare the map
if (query.length < 2) // zero characters or single '?' means no parameters
return params;
// cut '?' away:
query = query.slice(1);
var paramList=query.split('&'); // separate parameters
for(var i=0; i<paramList.length; i++) // enumerate them
{
var pair = paramList.split('=');
params[pair[0]]=pair[1];
}
return params;
}

var query=location.search; // get everything after question mark
var params = decodeQuery(query); // and turn into an indexable structure
var p = (params.id) // checking if 'id' is present
? '&action=more_details&id=' + params.id // if present, then ask for more details
: ''; // otherwise - don't.
var iframe = document.getElementById('myFrame');

iframe.src="http://www.sneserver.com/homelistings/index.php?BuilderID=197" + p;
</script>

Continued...
I use iFrames because I have many pages to navigate, but maybe with a module I could use an include function - Any thoughts?

I can make everything else work on SilverStripe I believe, but there has to be some ideas of creating or expanding on the iFrame module to make this work. Any ideas to give me hope? I will also be talking to my programmer tonight and will update that conversation here.

I also run a rotating image on the side of my sites...
http://threebridges-southhaven.com (you can view my iFrames on "Homes and Plans")
and even small iframes in the pages for a customer that wanted a different image each time you visit the page - I also am using a rotating image script in the template.
http://www.legacyhardwoods.com

With SilverStripe I think I can get away from some of these iframes and build some modules or widgets to do the same thing - any thoughts?

Thank you,
Steve

P.S. I should also tell you that these sites are built on SiteBuilder from SwSoft.com. I had to do a lot of modification to the templates to make this all work, but I have far too many issues and bugs that my clients are getting unhappy with the down time - I need something better and more custom. One thing the SiteBuilder does do, is drag in a module onto the page, I use the script module to add my iframes.

Avatar
steve_nyhof

Community Member, 224 Posts

19 May 2008 at 11:10am

I modified the iFrames module and was able to get my iframe to show up. I even got a link for a sub menu, although not correct. I am still messing around to try and get this.

I have about 5 iFrame pages from my main site that I include in my clients sites - have connected this way with the home builders we draw house plans for - for about 7 years.

My question to make sure I am heading down the right road... Should I make a separate module (page) for each of these iframe pages so I can quickly add it to the site I am building? That's how I understand this - or is there a better way?