Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Maxunderground news unavailable

I don't want to use Iframe, what shall I do?
show user profile  Nanne
Many of you seems to be skilled in the art of webdesign, so I post this question here as well :)

I would like to know how to make a site where the menu is always showing when the content is changing.

I first used an Iframe to display the content and just put the menus (one Main menu and one sub menu) around the Iframe. The problem with this is that you don’t see the whole link in the navigation toolbar in your browser and I want that so that you can direct link to different parts of my webpage. So that the navigation toolbar displays something like this;
(it’s not link, I just want to show what I want the navigation toolbar to display)

Here is an example on a page:
this page I can link to what ever part of it I want. And the top banner and the menu to the left side are always showing but the content’s changing when selecting a new menu option.

Is this done with some fancy Java or PHP script? If so, can someone link som nice tutorial so that I can learn this?

Or is it that simple that you have one HTML-document for each part of the page and just puts the menus (I will make dose in Flash) on every single HTML-page? This sounds easy but not technically fancy enough that’s why I doubt on this method, or is it really that simple?

Here is a sketch on my site, I’m still working on it. The pictures in it are not mine, I just use them to illustrate where I will but my art in the final production.

Thanks for the help :)

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 608 times
5/20/2006 7:06:27 AM (last edit: 5/20/2006 7:06:27 AM)
show user profile  MrPumpernickel
You could do that very easily with the aid of "PHP include". Basically make your HTML file into PHP and have every additional PHP file include the HTML from a separate file in which you have the menu. It'll always be there and you only need to change one HTML file if you want to change how the menu looks and behaves through the entire site.

I can give you more information about this once I get home from work, it's really easy to do though.

YouTube Channel

read 595 times
5/20/2006 7:32:28 AM (last edit: 5/20/2006 7:32:28 AM)
show user profile  Nanne
That sounds promising :) My skills in PHP are very weak though :( But I'm willing to give it a shot! :D

Tack ska du ha för hjälpen!

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 588 times
5/20/2006 8:03:24 AM (last edit: 5/20/2006 8:03:24 AM)
show user profile  MrPumpernickel
You don't really need much skills, if you know HTML and know how to change information to suit your needs (i.e. replace links and so forth) it's pretty straight forward cut/paste.

[edit] oh yeah, and here you can see how seemlessly it works. The following page, as well as all the sub-pages, use the PHP include thingamabob whereas the rest of the site doesn't:

YouTube Channel

read 579 times
5/20/2006 8:20:41 AM (last edit: 5/20/2006 8:41:35 AM)
show user profile  Nanne
Yeah, that looks nice :D I think this can be something for me :) Do you know a tutorial or something like that for the PHP-part so I can read and truly understand the principles? :)

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 564 times
5/20/2006 9:51:52 AM (last edit: 5/20/2006 9:51:52 AM)
show user profile  MrPumpernickel
First hit on google for "php include tutorial":

If you need it explained any further then I'll be glad to do so, but as you can see it's pretty straight forward as long as you know your way through some HTML.

This can also be used to create footers on your pages (like if you want your e-mail at the end of each page for instance) or other things. It's a handy little thing :)

YouTube Channel

read 560 times
5/20/2006 10:03:04 AM (last edit: 5/20/2006 10:03:04 AM)
show user profile  Nanne
[error, read post below]

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 557 times
5/20/2006 10:22:42 AM (last edit: 5/20/2006 10:52:24 AM)
show user profile  Nanne
haha, hmm... I was trying to show som HTML-tags, but they were converted into a table :P

I write it agian but skip the <>-characters

Can I control where the included files ends up using tables or CSS? Something like:

(TR) (TD) (?php include(""); ?) (/TD) (TD) Welcome to my page! (/TD) (/TR)

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 551 times
5/20/2006 10:27:34 AM (last edit: 5/20/2006 10:29:10 AM)
show user profile  MrPumpernickel
Yes, you control exactly where in the file you want it to be.

If you put it in the beginning of a file you can put the html, head and body tags into the file you're including, if you want it to be in the middle of the file like in your example you leave those parts out, and so forth. Dead simple.

YouTube Channel

read 542 times
5/20/2006 10:33:41 AM (last edit: 5/20/2006 10:33:41 AM)
show user profile  MrPumpernickel
Hmm, on second thought it's probably better to use require instead of include (basically use the word "require" instead of "include", otherwise identical) since require will make nothing of the page work if there is an error when it's trying to include. If you're using include and there is a problem with the file you're including then it'll just skip it and show the rest of the page which may not be what you want.

YouTube Channel

read 539 times
5/20/2006 10:37:28 AM (last edit: 5/20/2006 10:37:28 AM)
show user profile  Nanne
hmm... but thinking of it, the two menus Main and Sub will be made in Flash... so then I could just add the SWF to each html... I see no point in adding the SWF to a HTML and then include that HTML in the HTML where all the content is displayed.

But I think I can find some other use for it :)

Kristoffer Helander
  :: Works ::   |  :: Resumé ::   |  :: Contact ::   |  :: CG Blog ::   |  :: Links ::     
read 536 times
5/20/2006 10:49:20 AM (last edit: 5/20/2006 10:49:20 AM)
show user profile  HappyDude2
PHP include works great :)

read 516 times
5/20/2006 12:56:52 PM (last edit: 5/20/2006 12:56:52 PM)
#Maxforums IRC
Open chat window