[ZPT] page layout by "including" objects

Evan Simpson evan@zope.com
Wed, 08 Aug 2001 10:43:07 -0400


Ron Bickers wrote:

>>>Q: Is it safe to redefine 'here' in the div block?
>>>
>>Though I don't see the need for doing it, I guess it should be safe in the
>>example above.
> 
> The idea was that I could create the 'view' template that uses 'here' and
> call it from the Web, as in '/Quotes/quote1/view' such that 'here' would be
> 'quote1'.  In addition to being able to call it via the Web, I could also
> define 'here' as a specific quote (as shown above) and use the same 'view'
> template to display it.  Make sense?

Yes, but you're probably better off using 'here' as a fallback rather 
than redefining it.  In other words, define a variable such as 
'chosen_quote', and use "chosen_quote | here" instead of "here".  That 
way, if 'chosen_quote' isn't defined, 'here' will be used.

Cheers,

Evan @ Zope