Cecil Westerhof schrieb:
> I would like to do some thing like the following in my kid template:
> <?python
> back = 'Terug'
> create = 'Nieuwe'
> edit = 'Aanpassen'
> if( tableName == 'Owner' ):
> recordType = 'Eigenaar'
> if( page == 'new' ):
> title = '%s %s' % (create, recordType)
> elif( page == 'edit' ):
> title = '%s %s' % (edit, recordType)
> ?>
>
> But I can not use tableName and page here. In the template itself I can use
> ${tableName} and ${page}. Is there a way to access those values in the
> <?python part of the template?
You probably need to move the <?python block ?> somewhere inside the
<html> tag in order to access these. See here:
http://kid-templating.org/language.html#embedding-code-blocks-python
By the way, you don't need brackets in if statements in Python...
-- Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---