display_package_element(self,
p,
tales,
query=None)
| source code
|
Display a view for a TALES expression.
This method displays the view for the element defined by the
expression tales wrt to package p , with
facultative parameters in query . It handles the /packages folder.
The query can hold an optional parameter, named mode ,
which indicates a specific display mode for the resulting object. Valid
modes are:
-
image : the object is an image, and we generate the
correct headers.
-
raw : do not display the navigation interface, but only
the object's view
-
content : return the content data of an object, with its
specific mime-type
-
default : default mode, with navigation interface
The display mode has a default value at the server level,
wich can be set through the /admin folder.
An autodetect feature will force the display mode to
image if the object is an image (depending on the return
value of image_type).
All other other parameters given on the URL path are kepts in the
query dictionary, which is available in TALES expressions
through the request/ root element.
- Parameters:
p (advene.model.Package) - the package in which the expression should be evaluated
tales (string) - a TALES expression
query (dict) - options used in TAL/TALES processing
|