To notice that a view is not templatable, you just have to set the
view’s class attribute templatable to False. In this case, it
should set the content_type class attribute to the correct MIME
type. By default, it is text/xhtml. Additionally, if your view
generate a binary file, you have to set the view’s class attribute
binary to True too.

You can overload some methods of the
TheMainTemplate, in order to fulfil
your needs. There are also some attributes and methods which can be defined on a
view to modify the base template behaviour:

paginable: if the result set is bigger than a configurable size, your result
page will be paginated by default. You can set this attribute to False to
avoid this.

binary: boolean flag telling if the view generates some text or a binary
stream. Default to False. When view generates text argument given to self.wmust be a unicode string, encoded string otherwise.

content_type, view’s content type, default to ‘text/xhtml’

templatable, boolean flag telling if the view’s content should be returned
directly (when False) or included in the main template layout (including
header, boxes and so on).

page_title(), method that should return a title that will be set as page
title in the html headers.

html_headers(), method that should return a list of HTML headers to be
included the html headers.

You can also modify certain aspects of the main template of a page
when building a url or setting these parameters in the req.form:

__notemplate, if present (whatever the value assigned), only the content view
is returned

__force_display, if present and its value is not null, no pagination whatever
the number of entities to display (e.g. similar effect as view’s paginable
attribute described above.

__method, if the result set to render contains only one entity and this
parameter is set, it refers to a method to call on the entity by passing it the
dictionary of the forms parameters, before going the classic way (through step
1 and 2 described juste above)