Hi,

I have two questions, on a normal one, and one a kind of 'meta question'. 


Okay, the normal one is about comparing strings and numbers.  I'm sure it's an 
old one.

If I have a date in a string '2003-01-23', and I want the month, I can do

[% date = '2003-01-23'
   ymd = date.split('-') %]

Month is then ymd.1.

However if I try

[% month = 1 %]
[% 'selected' IF ymd.1 == month %]

Nothing is output, since the comparison fails.  '01' is not equal to 1.  Under 
perl this woud have succeeded.  How can I convert '01' to 1?  Adding zero 
does not work.


Now, a the 'meta' question - I tried to find the answer to this question and 
failed.  I looked in the TT2 documents and man pages, the TT2 website, the 
TT2 FAQ (which is rather short), as well as by searching Google, and by 
searching this mailing list - manually because there is no search facility.

Am I missing something?  Is there somewhere else I should be searching?

Do I really have only the options of manually trawling the mailing list 
archives or downloading a 13MB file and searching it locally?

And shouldn't TT2 have a more comprehensive FAQ or a Wiki or something 
similar, considering how popular and well-discussed it clearly is?

Thanks,

Nick

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.ourshack.com/mailman/listinfo/templates

Reply via email to