Gossamer Forum
Quote Reply
css issue
Hi,

I have an issue with Beta 2 - when I include <%css%> in my template it shows up as text on top of the page (as part of the html)?!?!

If i then include the <style...> in the template itself it works.. - I noticed this happend after the upgrade to Beta 2 - did anyone else notice this (or found a solution to the same)

Save problem if I try to include a javascript using a global..?!?!

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] css issue In reply to
When you view the source (particularly with the JS global) what do you see?....are the < and > tags being converted to &lt; and &gt; ?
Quote Reply
Re: [Paul] css issue In reply to
yes that's right....

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] css issue In reply to
Could I see your global?
Quote Reply
Re: [Paul] css issue In reply to
Sure...

attached (did work before the upgrade to Beta2 though - although I might have changed something...?!?)

Cheers
Klaus

http://www.ameinfo.com

Last edited by:

klauslovgreen: Mar 13, 2003, 11:39 AM
Quote Reply
Re: [klauslovgreen] css issue In reply to
That just looks like the css code...is there not more to the global?
Quote Reply
Re: [Paul] css issue In reply to
Nope that is all that is in there...?!?

and inserting it in as <head><%css%></head> in the template..

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] css issue In reply to
Oops I was thinking of a code global (sub { })

Hmm it looks like it should work...maybe this is a bug. You might be able to get around it by using a code global and returning the css...eg...

sub {
my $css = q|
...the css...
|;
return $css;
}

Last edited by:

Paul: Mar 13, 2003, 12:58 PM
Quote Reply
Re: [klauslovgreen] css issue In reply to
Hi,

This is indeed a bug. To fix, edit lib/Community/Web/User.pm and change around line 804 to:

$vars->{$global} = $globals->{$global} unless (exists $vars->{$global});

to:

Code:
unless (exists $vars->{$global}) {
$vars->{$global} = ref $globals->{$global} ?
$globals->{$global} :
\$globals->{$global};
}

You'll also want to make the same change to Web/Admin.pm line 113.

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Mar 13, 2003, 2:16 PM
Quote Reply
Re: [Alex] css issue In reply to
Thanks Alex - I'll just wait for the next version of Community - assuming you will include this fix..

EDIT:

Tried it out - but afterwards all globals fails (gives errors)

I'll leave it as it is and await the next version for now

Klaus

http://www.ameinfo.com

Last edited by:

klauslovgreen: Mar 13, 2003, 1:52 PM
Quote Reply
Re: [klauslovgreen] css issue In reply to
Oops, I fixed it up.

Cheers,

Alex
--
Gossamer Threads Inc.