New Application Format Filename
And this area includes the title and meta-tags. One workaround for this type of system is to code the top template page to check which file it is being called from and to substitute a suitable pre-coded title. Although effective such a system is cumbersome to maintain as each new page that is published warrants a new title and meta-tag entry in this secondary system. Body-Only Includes The ideal PHP templating system will permit content producers to enjoy the reusability of templates while maintaining unique titles and metadata for each page with ease.
This article is intended for PHP web developers who create template systems for consistently presenting website content. PHP designers who create their own template systems should be concerned about how their choices affect the website s position in search engines. Below is a discussion of three types of systems their impact on search ranking and a recommendation for the best approach. Webpage as a CGI Argument In this architecture one PHP script contains the entire template and plugs in content from a file it reads in - getting the file name from a CGI parameter.
Most Popular This Week
I find this system the most search-engine friendly because it keeps the title information and the content together - allowing for the presence of relevant unique titles for each page. This system is also the most human friendly as storing the title information in the same file as the page content allows for fast updating and avoids maintaining a second "workaround" system that attempts to match titles to content. Conclusion The types of template system that PHP developers choose to implement for clients sites have a crucial impact on the future search-engine popularity of the client s webpages.
Template as an Include In this architecture each page on the website has its own filename with a .php extension. The top and bottom portions of the template are stored in separate files that are included (using include_once() ) by each content file. This technique increases the importance of the page with search engines as each page is its own standalone page rather than a CGI argument. This type of template system also makes it simple to track page views through regular website statistics software. On the other hand this type of template system still has the weakness of having one title and one set of meta-tags for the entire site.