PDA

View Full Version : SSI in design view


Rich_A06
04-12-2007, 04:13 PM
Trying to convert a frame based site to SSI but it makes the design view a mess. Is there a way to keep a layout unchanged after linking to shmtl page? Kind of like building a frameset except with SSI and designer view friendly.

Rich_A06
04-12-2007, 09:13 PM
OK I figured out that the linked htm or whatever file can only include script and body code. Then it's a matter of linking the new shtml document to my css files and then using the 'Design time' feature which is a right click on the CSS styles toolbar in design view.

Yes it works and I can see the benefits, just hope I can repeat what I did!

Rich_A06
04-13-2007, 02:05 AM
Well if you at this site www.eoaa.org ..

There's really no other way than to use frames because there are links to the main frame of things like a forum and php databases so SSI is not an alternative because SSI can only deal with content. I think the only alternative is to use bridges like Joomla.

Mind you I notice that this site doesn't use frames and yet it is able to link to this forum and maintain a static header! So how was that done?

domedia
04-13-2007, 01:47 PM
In php I would just put the header code in a separate file, header.inc. and then call it to the pages I needed it on:
<?php include('header.inc'); ?>

Voila :)

Would that work for you? If you want to use SSI, you should learn it. I think it was built specifically for what you need it for, but I've never used it.

Your position on frames are kinda.. weird. The *only* advantage to frames is to load complete external html pages into your website. There's occasions where you might want to do that, but it's more in special cases.

If you use frames for *anything* else, you're using the wrong approach/technology. It's like using a toaster to drive a nail through the wall, like davidj would say.

davidj
04-13-2007, 02:01 PM
i wouldt use the .inc extention

use .php

security issues

domedia
04-13-2007, 02:15 PM
I have no idea what you are talking about, my guess is noone else does either 8)

davidj
04-13-2007, 02:46 PM
if some helmet came along and tried to mess with your site by keying a path to an .inc file this would prompt for a download and the entire php script would be downloaded to the helmets machine exposing vars and session names and possibly SQL which could identify table names and database info etc. But if the same helmet tried to key a path to a PHP file then the engine would strip any php before returning it to the browser which would contain nothing but shite HTML and a possible error string.

much safer

never use a .inc extention when coding PHP. Always use .php

domedia
04-13-2007, 03:59 PM
Excellent advice, thanks dj!

Rich_A06
04-13-2007, 07:31 PM
How about using tables and make the main frame scrollable. That's possible but how then is it possible to view a web page within a cell, well not even view it it needs to execute index.php in the forum folder!

davidj
04-13-2007, 07:35 PM
check out <iframe >

no flames please

Rich_A06
04-13-2007, 08:23 PM
Yes I've read about them but only briefly. There are apparently cons to using iframes too. Would probably have a go at it but then the code that needs to be learnt and written can be a little overwhelming. Is there are GUI iframe program? No doubt iframes is now out dated by more modern techniques which is why there's no GUI for it.

davidj
04-13-2007, 08:27 PM
I'm of the new generation and so am used to GUIs

if you want to create something great your going to have to learn how to code

because once you reach the limits of Dreamweaver you will be asking for extensions which dont exist

domedia
04-13-2007, 09:04 PM
iframes are used for the same reason as regular frames.

If you want to get scrollbars on your website, don't use iframes ('the toaster'), but use CSS which is the technology for styling your website. Theres a tutorial on the homepage describing how to define a div with hight and width and create scrollbars for it 8)
http://www.dreamweaverclub.com/css-scroller.php

You can code it like the tutorial does, or use the DW GUI to insert a div, set width and height, and then use the CSS panel to set the overflow property.

davidj
04-13-2007, 09:08 PM
and you can call another page into that CSS scroller??


That's possible but how then is it possible to view a web page within a cell

Rich_A06
04-14-2007, 04:30 PM
Well I've been searching about and found out that MS Frontpage 2003 has a GUI for iframes of sorts and apparently it works exactly like normal frames do i.e it gives no real advantage over normal frames except it is possible to insert a frame box rather than building an entire framset.

It is possible to have a link in one iframe and have that link open in another iframe simply by setting the target to the name of the iframe.

Which is exactly like DW's target feature. i.e. the frames appear in the target box after a frame has been given a name. Also if an iframe frameset of sorts is created then the URL will remain unchanged when linking and browsing between iframes. Exactly like frames.

And I noticed that when jump menu targets are set to open in a particular frame, the menus don't work when opened in a new page i.e. in a page with no frames. It's the same with ifames apparently. This is because when making a jump menu that's intended to be used in a frame this code is written onChange="MM_jumpMenu('parent.frames[\'frame main\']',this,0)but when this page is opened in a new page without frames it's draws a blank and does nothing i.e. http://www.eoaa.org/Events/GTR2/Results/results%20quali%20index.htm#. Does any one know a way to make the menus work in both a frame environment and a non frame environment? Rather than having to create copies with only that one parameter changed.

So if I want the URL to change it means linking to another frameset or iframes index.htm which is no big problem.

There are many advantages to using frames and there are only the disadvantages I've mentioned here - all of which can be gotten around by doing a little extra work. Having said that they are not search engine friendly so I would definitely not use frames if I was selling stuff.