Forum OpenACS Q&A: "match" operator

Collapse
Posted by Nick Grossman on
Hi,

I'm trying to use the "match" operator to make a style sheet appear in certain situations (brackets removed):

if @this_url@ match "/communities/grand-boulevard/admin/*"

However, i'm getting this error:

Invalid conjunction match in if tag.

I've used this same construct before, although in version 3 (this site is in version 5).

Am I doing something wrong? Is there a better way?

Thanks,

Collapse
Posted by Nick Grossman on
The reason i'm trying to do this is so that the admin pages of my subsite won't show up with all the subsite formatting, since it interferes with the admin pages.

Is there a better way to accomplish this? I have the subsite using it's own template in the subsite configuration. I'd prefer it if I could get the admin pages to use the standard "tabbed" template.

Thanks,

Collapse
3: Re: "match" operator (response to 1)
Posted by Torben Brosten on
I am sure there is a better way, but until someone posts a clever answer, you can try this:

In the .adp file:

<if @admin_url_p@ true>

In the .tcl file, calculate admin_url_p so that it equals 1 for true, 0 for false.

set admin_url_p [regexp "/admin/" $this_url]

Collapse
4: Re: "match" operator (response to 1)
Posted by Nick Grossman on
Thanks - i'm sure that will work. Yes, I agree there should be a better way.

Best,
Nick