Merge data into a template before publishing?

M

Mr. Analogy

Hi,


Lets say you've got a simple table of product info:
Name, description, price, screenshotname, etc.


I'd like to be able to merge that into a web page.


So, I could have one template and perhaps 20 products in my table.


I don't want to mess with a SERVER-SIDE database. The cost savings for

such a small # of products doesn't justify that extra complexity. I
don't want to maintain a database, I just want to have a simple csv
file of product info.


Is there any way to do a simple substitution-type merge?
I.e., FP currently supports substituting it's own "variables" and ones
you create (via Insert-web component-INcluded content-substitution).
 
T

Thomas A. Rowe

You would still have to use a server-side script to pull data from a .csv or text file to then
display on a page since the merge has to take place before the page is sent to the browser.

If you only have 20 products, just create 1 page and save it 20 times, and then change the product
info for each page. This will allow the search engines to index your individual products.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
M

Mr. Analogy

Thomas,

The issue is that I want to to have the info on each product broken
down into:
..name, .shortdescription, price, etc. That information is used in
multiple places (product list, shopping cart, actual page for that
list).

I did come up with a way to do it:

Using VBscript function that takes (template.htm, datafile.csv) as
input.
Spits out one .htm file for each .csv file element, named
appropriately.
Each of those is a file that will be included in a copy of the template
file.

The function also creates versions of the template.htm file with
frontpage "includes" for each element.

Now :

ProductName.htm will contain
blah blah.... <includes ProductName-FieldName.htm>
 
M

Mr. Analogy

Thomas,

The issue is that I want to to have the info on each product broken
down into:
..name, .shortdescription, price, etc. That information is used in
multiple places (product list, shopping cart, actual page for that
list).

I did come up with a way to do it:

Using VBscript function that takes (template.htm, datafile.csv) as
input.
Spits out one .htm file for each .csv file element, named
appropriately.
Each of those is a file that will be included in a copy of the template
file.

The function also creates versions of the template.htm file with
frontpage "includes" for each element.

Now :

ProductName.htm will contain
blah blah.... <includes ProductName-FieldName.htm>
 
T

Thomas A. Rowe

OK, however I have no idea what my original reply was, but glad to hear that you found a solution.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top