On Thu, 2004-11-04 at 15:35 +1100, Cat wrote:
> What made me work with php was it's ability to draw reusable page
> elements like the header, menu, footer from another html page from a
> fixed html page.
> 
> Now I know that this can be done in perl when the pages are generated
> by a script,

When a page is generated by PHP it is generated by ... a script! PHP is
just another programming language.

>  but my pages are fixed html to take advantage of meta tags etc plus

If you mean "static" HTML, then:
* That will have no influence of your ability to use <meta> elements
* That will provide no advantage to any search engine optimisation you
might be trying to do

Static pages do make it somewhat less work to get sane cache control
headers, and that can provide benefits to search engines (and, more
importantly, to visitors).

>  completely different layouts required within the one function.

Do I not understand what "function" means in the context of programming?

>   So I was attemtping to use the function in php to call headers,
> footers etc from another html page so that I don't have to alter 150
> odd pages each time I change one minor thing in the layout.

As I believe I suggested before, you can do that with Perl.

> So, I am not sure that it would be a great idea to call a subroutined
> directly from a fixed html page even if it can be done....

Again, if you mean "static", then you can't - by definition. The moment
you start calling server side scripting functions/methods/subroutines
your page becomes dynamic, not static.

> so how else would I call my headers. footers etc using perl.  Tis the
> question at the end of all of that  :-)

I think I mentioned Template::Toolkit last time. 

<http://search.cpan.org/~mjd/Text-Template-1.44/lib/Text/Template.pm>

There is also HTML::Template.

<http://search.cpan.org/author/SAMTREGAR/HTML-Template-2.7/Template.pm>

and Mason.

<http://search.cpan.org/author/DROLSKY/HTML-Mason-1.27/lib/HTML/Mason.pm>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to