View Full Version : Setting up New Pages?? Plz Help.

04-13-2012, 08:25 AM
Hello ConcreteWaves here. I'm interested in learning this code...but I got no clue what it is.

Basically, I have a layout - in html and css, how I want it. But now - I need to create the links...and what I want to do...is get the links as you click them...to of course, show up in the content area on my layout.

How the f**k do I do this? lol. What steps do I take to do this? I am very new to the new ways of HTML and CSS...and i'm wondering, how do I keep my index.html and style.css stay "there", while I click let's say "about us" or "image gallery" and they show up in my content area.

I am confused as to my next step and want to get a move on this website I am making. Practicing, to get back into this.

For more example, I'll babble on some more.

I think it could be PHP or javascript. idk...I had a buddy do it for me back in the day on an old site...something like php include?? i don't even remember. But I basically had my index.html, i saved it as index.php. all the other links: aboutus.html gallery.html rates.html etc etc, became aboutus.php gallery.php rates.php. But the actual HTML on those pages, was simple...all it was, was what I wanted that page to say...no style, no layout...just text...and pictures I wanted to show up in the content area. And my style automatically knew what size and color and style font to make it.
That's all I'm trying to do...is have my index.php w/ the style.css that goes with it, stay "there" and when i click links, they just poof change in the content area.
I got no clues, and no leads. Some people tell me php some people tell me javascript. I got no clue what codes, or nothing.
Even if I didn't set it up that way....I forget how to even begin making pages....that go into my content area...if it's a new link i click, how does my website know to stay the same "look" ie. style? Do i have to put the style=text/css or w/e on the top of all the pages or what? But if so...how does my new link know to only open in the content area?
I dunno, I'm at a halt and don't want to be. If I can get over this hump I'll feel better, and coast through making all the pages how I want them to be and get this site up for my mother in law.
All codes, leads, w/e you guys can give me, will be greatly appreciated.:thumbsup:
Did a little more research. I am wondering now, if it is an include of some sort. Or, some people say in dreamweaver to make the navigation a Template? But how do I do that....and I don't want just the navigation, I want everything but the content area to be basic template.. so I can edit just the index to update the news ticker and change a banner in due time or f**k with the links.
So that I don't have to go through every single page like a noob and edit the same thing for all my pages.
Still no solid leads or answers. Like +5% clarity.

04-13-2012, 12:17 PM
OK, first principle should be to get a website working without JavaScript before you think about using it. That said, you’re probably not looking for a JS solution yet.
Now, in static HTML pages you have your navigation and possibly other elements that are the same on every page and you have your content that is different on every page. I understand that, if you want to change something globally on all pages, you don’t want to go into every HTML document and change it? In that case PHP includes (http://php.net/manual/en/function.include.php) (or server side includes (SSI)) are the way to go.

You still have all your different content pages but where you have your global content that’s the same everywhere you put that include statement with a path to the file. In case of a navigation you write just the navigation’s HTML (no header, no doctype, nothing but the specific HTML element(s)) into the file that will be included on all pages.

04-14-2012, 12:48 AM
Could I get some example? let's say I have my index.html and style.css for my layout...how I want it to look when u enter the page. Then when you click. About us at the top of the page, aboutus.html shows in my content area. So the index and style is global. How do I do this with the php include...I'm thinking on my index.html ill have to add a code in my content area that basically says "link all pages clicked to this content area". And I'm assuming with that, follows, every link I have to add a code saying something along the lines of "this page is one of the links to open in the content area!" Lol now turn my quotes into code! Ha! Is that kind of what you mean by php includes?

Of course, I do know, all my .html will be renamed to .php. the links and index.

04-14-2012, 04:47 AM
Just copy and paste all the coding from index.html and paste it into a new file and then take out and edit just the bottom of the page where you want it.

If you want to create a template, the extension must be .php if you want to do it on a server side.