[thelist] Static Page Generation with PHP

Alex Ezell taranis at spittingllamas.com
Wed Sep 3 09:06:04 CDT 2003


I have been wrestling with this for some time.

First, the basic idea is for the user to go through a process
of picking clients, projects, and work that they want to include
into a template for a portfolio.

Right now, I already have a system for choosing the clients and
projects and work. I also have all the management pieces that go
with that.

What I need help with is how to take the "configurations" of each
user and turn that into static code in the easiest and fastest way.
I am already able to write the static HTML files into variables and
save them to disk if need be. I am also using Smarty for the templates
for the portfolio and the rest of the site.

Ideally, I would like to write all the HTML into a variable or array
and then store the files in a ZIP somehow that the user could
download. I just can't quite seem to get my heard around how to go
about it.

Any pointers, pitfalls, or other suggestions would be much appreciated
as they might jog my vacation-clouded mind.

Here are some more details. Essentially, a script will go through
a "configuration" record in the DB and for each piece of "work" that
the user has specified, the script will create a static page with
that image and client name, etc.

These pages will named in such a way that links will also be built.
Something like "work1.html, work2.html, etc." So, essentially, you
have a static portfolio that you can download and burn to a disc.

That's the ultimate goal of the project.

-- 
Alex
http://www.spittingllamas.com
"Formal Restrictions, contrary to what you might think,
free you up by allowing you to concentrate on purer ideas."
 - Winter Sorbeck in Chip Kidd's The Cheese Monkeys



More information about the thelist mailing list