Prev | Current Page 511 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


Note that the use expression must be closed with the end expression. This is necessary because of a very
nice feature of the use expression: The current template can include another template, but it can also be
wrapped by a template that acts as a container. Imagine that you have a standard layout and that
the only thing that changes is the main portion of the page; you create at least two templates, one for the
layout and one for the main section. In the code you are required to execute the main section template,
and this will load and be wrapped by the layout template.
Part II: Server Side, JavaScript, and Flash; Oh My!
266
The following example shows just that. First, a common layout template is realized and saved in the file
layout.mtt .
< ?xml version=???1.0??? encoding=???iso-8859-1??? ? >
< !DOCTYPE html PUBLIC ???-//W3C//DTD XHTML 1.0 Strict//EN???
???http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd??? >
< html xmlns=???http://www.w3.org/1999/xhtml??? xml:lang=???en??? lang=???en??? >
< head >
< title > ::article.


Pages:
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523