[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Server Side Include Problem - RaQ3



On Wed, 22 Aug 2001, House of Jupiter wrote:

> Can anyone tell me how to schedule a server side include on a  RaQ3 please?
> I have 31 different files which need to be displayed on one day each month,
> and so far have had no luck.
> 
>  I know SSI  is working, because these two lines work :
> 
>  <!--#echo var="DATE_GMT"-->
> 
>  <!--#include virtual="01aq.txt" -->
> 
> But with th efollowing line :
> 
> <!--#if "&&DATE_LOCAL&&" hasstring "01" include file="01aq.txt"-->
> 
> I get an error has occured with this directive.

Because it doesn't work at all this way, where did you find this comand?
read http://httpd.apache.org/docs-2.0/mod/mod_include.html

'If' statments apply to the html that follows them, not the tags inside,
and there is no such thing as 'hasstring', you probably want a regex match

Off the top of my head, i'd guess something more along the lines of 

<!--#if expr="$DATE_LOCAL == /*01*/" ->
	<!--#include virtual="01.txt" -->
<!--#endif -->

You will have to play with the matching string tho...ot probably won't be
quite that simple to match a day to a number....
Personally, i'd write a one line perl script to do this, you are kind of
pushing the limits of what ssi's can do...

gsh