|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
AutoViewTemplatePluginAutomatically sets VIEW_TEMPLATE and EDIT_TEMPLATE
DescriptionThis plugin sets the VIEW_TEMPLATE and EDIT_TEMPLATE variables according to a corresponding form definition. So when you attach a new form to a topic, this plugin will enable the corresponding view/edit template automatically. This comes in very handy for applications where users create new topics without the help of a topic creator wizard, e.g. creating a new topic for a yet non-existing WikiWord. Together with the appropriate application settings, this plugin will then assure that the data the user enters is handled appropriately during view and edit.There are two modes on how the name of the template is derived:
Mode "exist"A topic that has aMyForm WikiForm attached to it, will be displayed
using the view template MyView and editted using the MyEdit
if they exist. The template name is derived by stripping off the suffix
...Form from the form name and appending ...View . The Wiki engine will
then use the template name MyView to search for the correct template along
the template search path, for example using a topic MyView .
Examples:
You have a form called
Mode "section"A topic with aMyForm will be displayed/editted using the template name
stored in the named section viewtemplate/edittemplate . For example given the
MyForm form definition topic contains a section viewtemplate whose only
content is MyOtherView , then this will be used to view the topic. Likewise,
the content of the edittemplate section in MyForm will read to find the
edit template.
By default existing values for VIEW_TEMPLATE and EDIT_TEMPLATE have priority.
You can change this behaviour in Examples:
We have a form called
We want this form to define that the topics are viewed with Below this we place the two sections that defines the templates to be used. Note that you must ommit the ...Template from the template names.
%STARTSECTION{"viewtemplate"}%ViewFormAtTopTemplate%ENDSECTION{"edittemplate"}% %STARTSECTION{"edittemplate"}%EditPurchaseRequest%ENDSECTION{"edittemplate"}%
Configuration SettingsThe following settings can be defined in configure
Plugin Installation InstructionsYou do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
Plugin Info
![]() |