DH Templates

How best to use html templates for 50 basically identical websites ?

Hi I work for a Freight company and we want to produce fairly simply coded html/css websites for all the countries we deal with. Around 50. The content for each will be individual but the layout, page names and colouring exactly the same. I have been advised to use tempaltes in SQL but have only experience producing one off websites. Also if you did use this route how would you edit the individual sites. Any help or pointing in the right direction would be appreciated. Thanks Conrad That strikes me as a complicated way of achieving the goal, specially as I have NO experience using SQL and very little with php. An example of a competitors website which bascially used this type of setup is expressfreightgermany.co.uk That is the same as expressfreightdenmark.co.uk etc etc etc. but to look at the page source you would'nt know ? and they are html page rather than php ?

Public Comments

  1. I would use an SQL database for the content. That helps you keep it organized and easy to fetch. Plus, database systems (like MySQL or Oracle) and be internationalized, so you can use content in different character sets and languages. But for the pages, I would have someone build them using a server-side scripting language. PHP is an example of a language that's perfect for this task. You can then program into the scripts all the HTML and style generation, while fetching and inserting the proper country's content from the database. So, to sum up (and simplify...this will be more complex in reality), in the database table you might have columns for country, location and a block of information in text. The template would be a PHP script that accepts the desired country name as an input (i.e., the user clicks on a link for a certain country), fetches that country's information from the data table, then builds the page, including the link to the CSS, and inserts that country-specific information into pre-determined locations on that page.
  2. OPTION 1: Personally I would have 1 website to serve the 50 (or more countries). Use ASP.NET or some other more advanced web programming than HTML. The querystring, has the country. For example: expressfreight.co.uk?country=germany expressfreight.co.uk?country=denmark ASP has by default a dynamic layout page. You pull off the content however you like, but you will only have to design, maintain and upload just one website with just a few pages. The very cool dynamic powerful way can be done with with ItemRepeaters, DataSets and SQL. You can get cheaply domain name service which would redirect: expressfreight.com?country=denmark to expressfreightdenmark.co.uk, if you really need to hide behind the 50 websites thing. OPTION 2: I think there are frames or other nightmare layout ways of doing this with just HTML. This way you can have a standard website base, your dynamic content in country specific html files. OPTION 3: ANOTHER possible but high crap way, if you don't move up to ASP or PHP, is to create your own template HTML website with special text place holders. You then run your magic string replacement program (which you would neeed to write) which would then make your 50 websites for you. Pulling the content from files somehow. Even this sounds a bit backwards, but if you need to make a change to all 50 websites then this will atleast be able to cope with that. OPTION 4: If you know for sure, there will be no futher changes, then just some good CSS and clean and simple HTML with lots off comments will suffice. Doing it all by hand.
Powered by Yahoo! Answers