Jade Sitetree - Layout Tag Library

Jade Sitetree - Layout Tag Library
Project Documentation
Module Documentation
Jade Projects

FAQ
  1. When should I use the Layout system?
  2. Can I embed one layout tag inside another?
  3. Can I place several layouts on one JSP page?
  4. Can I specify multiple templates in a single template file?
  5. How do <jsp:include ...>'s work?

When should I use the Layout system?

Everywhere, of course ;-)

The Layout system should be used whenever you wish to parameterize the layout of the page. Even a basic HTML page has several fragments that comprise the page. Some common fragments are:

  • header
  • top navigation
  • left navigation
  • ads
  • content
  • footer
Since it is impossible to predict when marketing will come up with the next company branding, it may be prudent to at least parameterize the basic page layout.

Back to list

Can I embed one layout tag inside another?

Of course. The tags will still work properly. Note, however, that each DefineTag is associated with its nearest LayoutTag.

Back to list

Can I place several layouts on one JSP page?

Yes.

Back to list

Can I specify multiple templates in a single template file?

No. Each template must be specified in its own template definition file. However, you can define a new layout in the template (that refers to another template).

Back to list

How do <jsp:include ...>'s work?

Unfortunately, the <jsp:include ...> tag is not supported with the Layout library. You can not place the include tag inside a LayoutTag. Various JSP containers have various behaviors. However, using the <%@include ... %> page directive works just fine. The include tag can also be used in other parts of the JSP page, outside the LayoutTag.

Back to list

Supported by SourceForge.net Logo