Content Architecture
You should think about site architecture before you create your first content page. Site architecture should be arranged so that you can make global changes to the look and feel of a site with no impact on the content. You also want to be able to change the code for an ad program, or even swap one ad program for another, once and have the changes take effect across your site in all the content pages.
Separating Content from Design
When you create content websites, it’s imperative to use mechanisms that separate web page content from design. The purpose of separating content from design is to let you:
Easily change the look and feel of a site without the change in overall site design having any impact on the content
Tweak positioning and other ad-related variables to maximize revenue without having any effect on site content
The simplest way to achieve these goals is to use includes—server-side includes—to position site graphics such as navigation bars. A server-side include is a file that the server includes within another file (the inclusion is specified by a special directive). When you view the HTML source code in a browser, you have no way of telling whether the main file was generated using includes or not.
Includes can also be used for advertisement code, such as that provided by Google’s AdSense. By changing the code in a single include, you can change the navigation bar or advertising parameters across all the content pages on an entire site.
The most important ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access