|
Post by silverlining on Feb 21, 2009 19:53:43 GMT
Okay, here's the deal..I made a website for my mom's store a while ago and because I was lazy I just coded it in plain html, nothing fancy. I discovered that was sort of a mistake though since the website is very much a WIP and occassionally my mom will decide that she wants a new menu item added. When she does, I have to manually change each and every single HTML page on the site to include the new menu item....Needless to say, it's not very fun. So I was thinking of re-doing the website from scratch and coding it in a way that lets me save the menu and content in separate files so that when the menu needs adding to I can edit just one file and the job is done. I thought that this was possible by using CSS and div layers but after looking at some tutorial-sites I'm not sure anymore because the layouts on said tuts still had all the coding in each page.. So basically I need help from anyone who knows some HTML and such. How should I go about re-making my moms layout in such a way that the side menu will be separate from the content so that updating the menu will take just one edit and not as many edits as there are pages? Will using CSS work? I've thought about using frames instead but I've heard not all browsers are good with frames, is that true? What do ya'll recommend?
|
|
CharlieChomper
Long Term Member
Totally Technical Helper
Please call me CharlieChomper (or even CC or "the other CC" on this forum). Thanks!
Posts: 1,756
|
Post by CharlieChomper on Feb 25, 2009 7:35:07 GMT
Admittedly, I had to reread your post to make sure I understood everything correctly (mostly my own fault in just not reading things as closely as I should have). I would advise against frames--not just because of some browsers having issues with them, but because they are considered rather "obsolete" these days and, quite honestly, there are other ways of doing things. I don't know what your hosting situation is, but it is possible to put together a page with the navigation (menu) saved to a separate file and then link to it on each page, so anytime you update or add/remove an option, it's only one file you need to update and upload versus each and every one. There are few different options you could potentially use for this, but again, it partly depends upon what the host supports and allows for. With a personal page I had designed, I ended up putting the navigational menu in its own file and then used CSS to dictate the style and effects of it and linked to them in a specific div I had set aside just for the navigation on a page I created to serve as a "template" for the rest of the site. However, as the host allowed for it, I ended up using PHP to actually make the navigational fully "functional".
|
|
|
Post by silverlining on Feb 25, 2009 7:40:26 GMT
Okay, now I'm confused. I've been looking into CSS and in all the tutorials I can find it's not possible to have the nav and the regular page load from different pages, but they use CSS only to dictate the style and colours remotely...:S
What about iFrames? Those "obsolete" too? (Honestly, I don't see why it matters how old or new a code is, I just want to use the easiest way to code this type of page).
|
|
CharlieChomper
Long Term Member
Totally Technical Helper
Please call me CharlieChomper (or even CC or "the other CC" on this forum). Thanks!
Posts: 1,756
|
Post by CharlieChomper on Feb 25, 2009 8:35:41 GMT
Frames have some other issues attached to them as well other than just their "age", some include browser-related problems and incompatibilities and if this site is going to be set up to be easily found on search engines, it also runs the risk of where the visitor may view one of the frame portions (as each "frame" is basically a separate HTML "page"), but may not be able to view the complete site. There are also some "behavioral" issues attached as well to them. IFrames mainly suffers from similar problems related to browser incompatibility and some web browsers being unable to process them at all (which may require having to create alternate pages as well as implementing things so that those using browsers unable to view them can access the site). CSS is primarily used for dictating things like the overall "style" (and sometimes effects) of a page or attribute of that page-it's not a "functional" language in its own right if that makes any sense? With the page I had mentioned earlier, for example, I had created the navigational menu as basically a "list" that resided within its own file (with the actual "look" of it, such as the color(s) used, font type and size, as well as an effect I used, etc. all called upon through a separate CSS file that was linked to it). However, to make that navigation menu actually functional and be able to reuse all the same elements of the page (banner, copyright notice/privacy policy/TOS, navigation, etc.) everytime I loaded a new "page" within the site, I ended up relying upon PHP as the host that the site was uploaded to supported it and allowed for it. Two other options I could have used would have been either Javascript (which would work regardless of what the host does/doesn't support as it doesn't rely upon the server, itself, in any respect) or (if that host had offered support for it and didn't charge extra for it) "server-side" scripting (more specifically, SSI) to make the navigational "functional". However, it partly depends upon your hosting situation and what they support and/or much work you want to put into it. Edited to correct a term.
|
|
|
Post by silverlining on Feb 25, 2009 9:15:28 GMT
Okay, thanks for the info. Well, I can't code in PHP (and the only tut I've found on it just gives a header and a footer, and I want two side menus) so I'm gonna have to do Frames or iFrames either way. I like CSS and all but as it can't do what I want it do on it's own I'd end up having to update every single page every time I wanted to add a menu item in the menu anyway and then I'd just have recoded the site for no good reason.
|
|
CharlieChomper
Long Term Member
Totally Technical Helper
Please call me CharlieChomper (or even CC or "the other CC" on this forum). Thanks!
Posts: 1,756
|
Post by CharlieChomper on Feb 26, 2009 6:50:59 GMT
|
|
|
Post by silverlining on Feb 26, 2009 7:32:58 GMT
Well, I dunno what the host supports and even if they do support the right thing I still don't know of a toturial or anything like that that codes for the right sort of layout.
Thanks for the help anyways though!
|
|