I would like to create several pages for a web site I run, one for each ‘product’ that my company services.
Each page would be basically identical except the page for product 1 would say something like ‘We service Product 1’, the page for product 2 would say ‘We service Product 2’ and so on.
I have a list of products, and I have a page template. Can I tell MS Front Page to take all these products and make a page for each one? I would also like the file name of the htm page to reflect the product name (more for my benefit to manage all the files).
If not Front Page (which I use only because my site is relatively simple) what do I need?
Well, the easiest way would just be to create a file named “product1.html” and have that list “Product 1”. Then “product2.html” would list “Product 2”.
Beyond that, you’ll need more of a server-side language that can grab a variable from the URL and use that in the page. Like “product.php?product_service=1”, then the page could take that variable and fill in the gaps of the page. But that’s way more complicated than Front Page can handle.
What’s stopping you from just duplicating the page and changing what needs to be changed on each?
You make one (or two, or a hundred) files that contain bits of html that you’d want duplicated over many pages, then include those files, in order, on your main page, around your content.
Quick lesson…
Include file: header.html:
<h1>THIS IS MY SITE</h1>
Include file: footer.html:
<h2>Thank you for visiting my site!</h2>
Example page: mypage.html:
<!-- #include virtual="header.html" -->
<p>This info is on my page</p>
<!-- #include virtual="footer.html" -->
When you browse to mypage.html it shows:
THIS IS MY SITE
This info is on my page.
Thank you for visiting my site!
You can then easily slap header.html and footer.html on each page, and each page would have different content “inbetween.” So if you want to change the text at the top of every page - just change header.html and viola! It’s changed on every page!
You also need to make sure you server supports them. If its a paid server it probably does… if it’s a free one, it probably doesn’t.
Also you’ll probably need the “.shtml” extension as opposed to “.html” on the product pages. That’s not a big deal to change, but it’s a hassle when you troubleshoot for half an hour trying to figure out why the includes aren’t working, and it’s because of the wrong extension.
Anyway, great suggestion by ZipperJJ! It’s been forever since I’ve use SSI, but it is a very useful tool for situations like this.
Actually if your host supports Front Page, and your editor is Front Page, then just make sure you find directions specific to Front Page - don’t worry about the .shtml stuff or whether or not your server supports it. If it supports FP, it supports FP-specific SSI instructions.
That’s how I do it now. The thing is I have 2200 pages to go and don’t want to do it manually.
Again, each page would be identical except for the words 'Product 1, product2, product 3 on their respective pages.
For example, the page for Product # 365 would be:
Welcome to Mr. Floppy’s fine emporium of widget service.
Did you know that we service ‘Product 365’ and would be pleased to provide you with a quotation.
Call 1 800 FLOPPY 1 today.
If you’re wondering why I’m asking, I seem to be using a page/word layout that gets me to the top of Google without much fuss for a common search term uch as ‘Product 365 repair’. I have manually done about 145 of these pages (for our most popular widgets) and nearly every one of them is either the top result or on the first page. If I was to let loose 2200 pages, things may be tropical island/slushy drink good
These aren’t spammy pages crammed with Google Adsense either. We do actually provide these services)
But the thought of coding another 2200 pages makes me shudder.
Ah, gotcha… then ZipperJJ’s solution will only be moderately better than what you’re already doing. You’ll still need individual files for each product.
A better solution would be the aforementioned “variable in a URL” approach. It would be pretty much a piece of cake to set it up… basically you’d link to “template.php?Product=Product_1” and the page would fill in “Product 1” wherever you told it to. Then you’d need only 1 file.
If it’ll save you a ton of time and make you a ton of money, it may be worth farming this little job out… If the design is done and you’re on a server that supports PHP or ASP or any number of languages, it should be a relatively basic job to do.
If you’re interested in a quote, my email is in my profile.
Interesting. Now I wonder, does googlebot see a .php page and rank it lower than if it was a static .htm page?
Reason being is that I have a competitor whose site home page ranks very high but none of his php pages (he evidently does what wasson is advocating and has thousands) show up high for any search. In fact I monitor his site heavily and wasn’t aware of his multitude of pages until I looked at his sitemap.xml file.
I thought this was going to be another cut-and-dried case where active content would win the day, but apparently not, because of the search engine thing.
I’ve done something very much like this quick ‘n’ dirty in Microsoft Access; create table1 containing a big list of all the values that will change from page to page, then copy/paste big chunks of the template HTML into fields 1, 2, 3 etc of table2.
Loop through the rows of table2 and just concatenate (table2.field1 & table1.field1 & table2.field2 & table1.field2… ) etc - then spit the resulting concatenation out to a new file.
But as far as Google or any search engine is concerned, there’s no difference between making each page its own separate file or the PHP/mod_rewrite technique. It’s true that people could “abuse” that by putting things like “Dirty_Prostitutes.htm” in the URL, but why would they ever even try?
Then, to have Google index all your pages, just create a sitemap that links to:
Then the pages will be filled in dynamically when visited by the sitemap and indexed accordingly on the search engines. It’s pretty basic.
There’s ways to prevent people from typing in random stuff in the URL, but I’m not sure if that’s totally necessary… search engines won’t be typing in random stuff when indexing your site. It will only be following valid links.