Re: Can I include a file or run a command from within a resource file?

2001-02-06 14:21:17
Brian Cameron wrote:

My page headers and page footers are stored in a separate file, which
normally get pulled into my pages via dynamic HTML.  One way I could
simulate this behavior so my mhonarc archive has the same look & feel
would be to use the "IdxPgBegin" and "IdxPgEnd" resources and copy
in the same files.

However, I hate duplicating this info in two places.  Is it possible
for me to specify that the value for "IdxPgBegin" and "IdxPgEnd" are
the contents of another file, or that the value for "IdxPgBegin" is
the output of a command like "cat that_other_file"?  Is there another
or better way to do what I am trying?

Can you do something with server-side processing, such as getting mhonarc
to really generate .shtml instead?  I've been working on a configuration
where mhonarc actually generates PHP calls instead of the HTML elements,
allowing me to make formatting changes by just editing the functions in
the PHP include file.

In your case if your server supports .shtml you could just define the
IdxPgBegin and IdxPgEnd elements to include the relevent external file. 
Note that if you change the HtmlExt resource though that you will probably
have to rebuild your mhonarc archive from scratch.

- Andrew
Every great idea appears crazy to start with.

<Prev in Thread] Current Thread [Next in Thread>