Home | Wiki | OI 1.x Docs | OI 2.x Docs |
OpenInteract2::Action::CommonDisplay - Task to display an object
# Just subclass and the task 'display' is implemented package OpenInteract2::Action::MyAction; use base qw( OpenInteract2::Action::CommonDisplay );
This common action supports the following tasks:
display - Display a non-editable object.
The 'display' task simply retrieves a specified object and sends it to a template. If the object checks its active status we first do that, but we don't really do too much.
c_display_template (no default)
This it the template we send the object to. The same object can be
found in two keys: 'object' and whatever you've set c_object_type
to. So a handler manipulating 'doodad' objects will find the specified
doodad in 'object' and 'doodad'.
_display_customize( \%template_params )
Called just before we generate the content. You can add parameters to
\%template_params
so your template will see them.
These are in addition to the template parameters defined above.
c_object_type ($) (REQUIRED)
SPOPS key for object you'll be displaying.
c_display_fail_task ($)
Task to run if we fail to fetch the object.
Default: 'common_error'
c_display_active_field
($)
If your object has a field indicating whether the object is active,
specify it here. If specified we check the object for true values
('y', 'yes', '1', 'true') -- if none match, we pass control to the
c_display_fail_task
.
c_object_class ($)
SPOPS object class derived from c_object_type
.
c_id_field
($)
ID field found from c_object_class
.
c_id
($)
ID value used to fetch the object.
Copyright (c) 2002-2003 Chris Winters. All rights reserved.
Chris Winters <chris@cwinters.com>
Generated from the OpenInteract 1.99_03 source.