Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [Paul] Templates and cgi parameters

Quote Reply
Re: [Paul] Templates and cgi parameters In reply to
Hi Paul,
I tried the following
1. Added <%load_params%> to the template but got an error Unknown tag: load_params.

2. Set up a global named my_param with line
sub { return $IN->get_hash} and inserted the line
<%my_param%> in the template.

I was puzzled as to how to access values in my_param but by analogy to the section 'Gossamer Forum Developers Guide : Enhancing Gossamer Forum' I tried <%MY_VAR%> [the page was called via 'http://the_path/forum.cgi?forum=9;MY_VAR=TEST ]

3. When that didn't work, I created another global variable that looks like:
Code:
# This file is auto generated and contains a perl hash of
# your template globals for 'default' template set.
# Generated on: Fri Feb 21 01:08:49 2003
# vim: syn=perl

{
'drb_hash' =>"sub {
use GForum qw/:user :forum $IN $DB $CFG $USER $GUEST $SESSION/;
$MY_VAR=$IN->(MY_VAR);
return {my_var=>'$MY_VAR' ; }"
};
thinking the variable would be accessed via <%my_var%>
but I failed miserably with multiple errors.

Every other template system I've used has made obtaining cgi parameters a snap. I keep thinking that I must be missing something obvious.

Any more suggestions ?

Thanks
Bob
Subject Author Views Date
Thread Templates and cgi parameters regert 6311 Feb 19, 2003, 1:51 PM
Thread Re: [regert] Templates and cgi parameters
Andy 6200 Feb 20, 2003, 3:35 AM
Thread Re: [Andy] Templates and cgi parameters
regert 6183 Feb 20, 2003, 8:47 AM
Thread Re: [regert] Templates and cgi parameters
Andy 6192 Feb 20, 2003, 8:55 AM
Post Re: [Andy] Templates and cgi parameters
bretzke 6176 Feb 20, 2003, 9:01 AM
Thread Re: [regert] Templates and cgi parameters
Paul 6185 Feb 20, 2003, 9:01 AM
Thread Re: [Paul] Templates and cgi parameters
regert 6171 Feb 20, 2003, 9:41 AM
Thread Re: [regert] Templates and cgi parameters
Andy 6201 Feb 20, 2003, 9:46 AM
Post Re: [Andy] Templates and cgi parameters
regert 6212 Feb 20, 2003, 9:55 AM
Thread Re: [Paul] Templates and cgi parameters
regert 6167 Feb 20, 2003, 11:26 PM
Thread Re: [regert] Templates and cgi parameters
Jagerman 6150 Feb 21, 2003, 3:11 AM
Thread Re: [Jagerman] Templates and cgi parameters
regert 6142 Feb 21, 2003, 1:15 PM
Post Re: [regert] Templates and cgi parameters
Jagerman 6111 Feb 22, 2003, 11:49 PM