You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matthew Seymour <ma...@bbc.co.uk> on 2004/01/02 16:36:32 UTC

[users@httpd] Includes based on a variable

Hi Folks. Firstly may I wish you all a good new year.

Now, to business.

I want to include an SSI in a page, with the name of the SSI being
chosen by a variable in the page (if that makes sense). Initially I
tried this:

<!--#include virtual='/commentscps/northyorkshire/<!--#echo
var="listname"-->.ssi' -->

Which of course doesn't work, and I think I understand why... But I
don't know how to make this work, or even if it's possible.

Any ideas?

Regards

Matt Seymour

BBCi at http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Includes based on a variable

Posted by André Malo <nd...@perlig.de>.
* "Matthew Seymour" <ma...@bbc.co.uk> wrote:

> I want to include an SSI in a page, with the name of the SSI being
> chosen by a variable in the page (if that makes sense). Initially I
> tried this:
> 
> <!--#include virtual='/commentscps/northyorkshire/<!--#echo
> var="listname"-->.ssi' -->
> 
> Which of course doesn't work, and I think I understand why... But I
> don't know how to make this work, or even if it's possible.

<!--#include virtual='/commentscps/northyorkshire/${listname}.ssi' -->

:-)

Please read the docs
<http://httpd.apache.org/docs-2.0/mod/mod_include.html#substitution> for
further information.

nd

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org