Mailing List Archive

[RFC] Apache::Inject
Hi,

I've created a mod_perl module called Apache::Inject that I've recently
put up on PrePAN [1]. It is my first Perl module, so I'd be grateful for
any comments.

[1] http://prepan.org/module/nYw5RG2DWu5

NAME
Apache::Inject - Apache directive for injecting HTML headers and footers

SYNOPSIS
DocumentRoot /uar/local/www/apache24/data
PerlModule Apache::Inject
<Directory /usr/local/www/apache24/data>
Inject head.html foot.html
</Directory>


Best regards
John
Re: [RFC] Apache::Inject [ In reply to ]
Thank you for this interesting addition.
When you write on prepan regarding SSI that "[w]hile you can technically
include <head> elements in your header file, they will be placed in the
body of the HTML page and not in the head." I would have to disagree.
With SSI you can include a file anywhere.

However, I agree "it is useful for adding headers and footers to a large
number of pre-existing static HTML pages" although arguably if they are
static why not just pre-process them once and for all ?

P.S.: I am the author of Apache2::SSI

Regards,
Jacques Deguest

On 2021/04/25 1:30, John A wrote:
> Hi,
>
> I've created a mod_perl module called Apache::Inject that I've recently
> put up on PrePAN [1]. It is my first Perl module, so I'd be grateful for
> any comments.
>
> [1] http://prepan.org/module/nYw5RG2DWu5
>
> NAME
> Apache::Inject - Apache directive for injecting HTML headers and footers
>
> SYNOPSIS
> DocumentRoot /uar/local/www/apache24/data
> PerlModule Apache::Inject
> <Directory /usr/local/www/apache24/data>
> Inject head.html foot.html
> </Directory>
>
>
> Best regards
> John
>
Re: [RFC] Apache::Inject [ In reply to ]
Hi,

thank you so much for your response!

Den 2021-04-24 kl. 23:22 skrev Jacques Deguest:
> When you write on prepan regarding SSI that "[w]hile you can technically
> include <head> elements in your header file, they will be placed in the
> body of the HTML page and not in the head." I would have to disagree.
> With SSI you can include a file anywhere.

No, I was referring to Apache::Inject in that sentence. Maybe I was a
bit unclear, but I meant it like:

"[Apache::Inject] is designed for injecting headers and footers that
belong in the <body> element, such as headings, menu bars and copyright
notices. While you can technically include <head> elements in your
header file, [Apache::Inject] will be [place them] in the body of the
HTML page and not in the head."

I'll try to clarify that sentence -- thanks!

> However, I agree "it is useful for adding headers and footers to a large
> number of pre-existing static HTML pages" although arguably if they are
> static why not just pre-process them once and for all ?

For one, it makes it lot easier to update the header and footer later.

Best regards
John