Hi.

I would like to use SWITCH and CASE to choose what I output to a page I'm 
creating using a template.

Following the manual, I have written the following:

[% SWITCH STAR_DETAIL.instrument %]
[% CASE NONE %]
|spe1d=[% STAR_DETAIL.spe1d%]
|ccf=[% STAR_DETAIL.ccf%]
[% CASE READ %]
|date= [%STAR_DETAIL.date%]
|filename=[%STAR_DETAIL.filename%]
[% END %]

STAR.DETAIL is the % I pass as argument when calling my template.
One of the field is instrument, that can be either READ or NONE and the others 
are spe1d, ccf, date and filename.
As you may have guessed, I want that the result of the processing of my 
template depend on the content of the field STAR.DETAIL.

I don't understand why this does not work, meaning that the switch case is not 
taken into account and nothing is replaced.

Thanks a lot.

Éric.

-- 
Un clavier azerty en vaut deux
---------------------------------------------------------------
Éric Depagne                            [EMAIL PROTECTED]
European Southern Observatory   
Alonso de Cordova 3107          
Santiago 19, Chile                      
---------------------------------------------------------------



_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to