[thelist] How do I (SSI/PHP/JS)?

Ray Hill ray.hill at informative.com
Mon Jun 17 19:04:00 CDT 2002

> Is it better to just create six pages (redundancy) or use
> something like includes/PHP/JS to have the non-identical
> content load into the one page "template."

I'd actually suggest doing the opposite.  Including the identical portions
makes more sense.  That way, if you need to change the identical bits, you
only have to do it in one place.

> Could I just have one PHP page with the identical content
> and use if/else logic to include the appropriate data?

Yes, that's also a good option.  You could even use such logic to decide
which non-identical bit to plug in from an include file (since the identical
bits will already be in one place).

If the identical bits will be needed on other pages that don't necessarily
follow the same template, I'd suggest the former.  If it doesn't need to
grow very much, then the latter would be just as easy.  Ultimately, it comes
down to which will be easiest to maintain if the site grows/changes.


More information about the thelist mailing list