[Templates] How to use multiple checkboxes with the same name in TT / Perl?

2012-06-28 Thread Khalid Akram
Hi,

I am having an issue using multiple checkboxes with the same name with TT.

If I have some checkboxes like this:





If I select 3 of these and submit, what gets posted to the CGI is this:

options=1&options=2&options=3;

In my receiving script I have:


my $options = $query->param( "options" );


which only gives me the first value!! What I need is a comma separated list 
that I can then loop over.


What is the best way around this?


Thanks


Khalid

Web Developer,

Farringdon, London.

This e-mail has been scanned for all viruses by Star.

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


[Templates] Problem with global variables

2012-09-17 Thread Khalid Akram
Hi,

I've set up a template with a global var as follows:


my $tt = Template->new( {

VARIABLES => {

username => 'Simba',

},

RELATIVE => 1,

} ) || die "$Template::ERROR\n";



In my template I do this:


This is a menu.html file:


Logged in as: [% username %] 


Which is included by every template like this:


[% INCLUDE menu.html %]


But I don't see  "Logged in as Simba" I just get "Logged in as"



What am I doing wrong?


I want to create a global var that I can display in a navigation file that is 
included in *every* template.


Help much appreciated.


Thanks


Khalid


This e-mail has been scanned for all viruses by Star.

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] setting checked

2014-12-05 Thread Khalid Akram

Try:

  Warmup



From: Bill McCormick mailto:wpmccorm...@gmail.com>>
Date: Fri, 5 Dec 2014 08:38:35 -0600
To: mailto:templates@template-toolkit.org>>
Subject: [Templates] setting  checked

[% IF flags && 16 %]
  Warmup
[% ELSE %]
  Warmup
[% END %]

This e-mail has been scanned for all viruses by Star.___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] setting checked

2014-12-05 Thread Khalid Akram
Even better would be:

  Warmup


From: Bill McCormick mailto:wpmccorm...@gmail.com>>
Date: Fri, 5 Dec 2014 08:38:35 -0600
To: mailto:templates@template-toolkit.org>>
Subject: [Templates] setting  checked

[% IF flags && 16 %]
  Warmup
[% ELSE %]
  Warmup
[% END %]
This e-mail has been scanned for all viruses by Star.
___ templates mailing list 
templates@template-toolkit.org 
http://mail.template-toolkit.org/mailman/listinfo/templates

This e-mail has been scanned for all viruses by Star.___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates