Arch design for many similar pages
Posted: Mon Sep 07, 2009 10:40 am
I want to have several similar pages. Each page is based on the same template. I would like to have the individual page instances be generated from a table which contains the page-specific info (perhaps a row for each page's values - e.g. Color="red"; Price="$9.95). The php template would then look up that page's info in the table. Of course, there would have to be an index into the table so as to know which row's value to grab for the page. If I were to use a numerical index, then I would have to copy the template for each page and have that single numerical index be different on each copied instance of the template. The only other idea I had
was to read the name of the current file and use that as an index into the table.
Of course, since I've starting learning PHP exact two days ago, perhaps there's a better overall way to architect this so I can have many similar pages with table-driven content.
Thanks in advance for any help.
was to read the name of the current file and use that as an index into the table.
Of course, since I've starting learning PHP exact two days ago, perhaps there's a better overall way to architect this so I can have many similar pages with table-driven content.
Thanks in advance for any help.