I'm about to start on a big project. I'd like to know some good standards to stick to in terms of headers and footers etc. I could keep all of the top of each page in a header include, and the same with a footer, but then Dreamweaver won't auto-complete CSS class names as I add elements into pages, as the stylesheet is linked from the header page. How do you split your pages? Sorry if that makes no sense!
Basically you could create a template system using PHP. You can check out my source code for a basic template system I created for a friend when teaching him. http://www.uni-code.com/templatesystem/ If you need help let me know, theres an example also.
You could also reinvent the wheel ... Smarty exists to tackle integrating complicated html with complicated php, and you should definately use that ... it's common to work on a design and code seperately as they have seperate functions, once you're comfortable with your design, you break it down into usable smarty templates ....
Start by figuring out the basic layouts that you will need. Sometimes a home page will be different than an article-display page, etc. If you have 2 (or more) basic layouts of a design, hard code a page of each and then use include pages to represent common sections. Concerning includes, one thing that I like to do concerning left and right columns is to 'nest' includes. In other words have a main 'left_inc.php' and a 'right_inc.php' and build each column section from a series of includes inside it. For instance, 'left_inc.php' might have 'top_ad.php', 'main_menu.php, and 'rss_feed_box.php'. The 'right_inc.php' could have includes of relevant right column content. Why nest includes? I like doing it so that I can easily control column content across all pages, and then for pages requiring more or less column content, I can still build these sections by means of includes without having to adjust several pages. If you wanted to get interesting without using a full-blown templating system, you could also use php to decide column content based on the url (have all these settings in one page, include it in the header and you control it all from one page!) As far as coding convention, every web designer I know has developed their own. My opinion is try to think as far ahead in the project as you can and keep things as organized as possible. After all, someone else may inherit your project! Here are a few points that I have learned over the years: ==>Organize the site into relevant directories. ==>Comments are underrated. Comment everything; php, css and even html. Don't worry, your competition won't discover your secrets by looking at your comments in the 'view source'. ==>Don't use a php 'God' script. Separate different functions and call them when necessary. For instance, on a 'preview' page, where there is no need to call authentication into play, don't require an auth function to look for a cookie or something. If your project ends up big, a lot of these little things can slow a site down, and it's a lot easier to take a small piece of code out and rework it if it is not all tied to one massive script. ==>Really think hard about your main menu. Google likes content that is easy to find, but a LONG string of links or sometimes even an overloaded css/javascript fly-out makes user's frustrated. ==>Balance SEO with user experience. If you have a good site, google will treat you well. ==>You mentioned Dreamweaver, make much use of the 'apply source formatting' tool. Indentations and whitespace are your friend when debugging. ==>Separate form and content as much as possible. That is what CSS is all about.
excellent replies as usual thank you! some real gems of info there. it's an intraent so seo isn't an issue i'll think hard about what you said.