Documentation

Parameters
  • NAME: application name, defaults to BASEWEB
  • THEWEB: web to search for docu, defaults to BASEWEB
  • TYPE: extract documentation of topics of the given type
  • NOTTYPE: don't list topics of that type

Css
  • twbDocuHolder
  • twbDocuSectionHolder
  • twbDocuSectionSummary
  • twbDocuSectionText

Implementation

%STARTINCLUDE%<!-- render application documentation -->
%DBQUERY{
   "WikiApplication='\b%IF{"defined NAME" then="%NAME%" else="%EXTRACT{text="%BASEWEB%" pattern=".*/(.+?)$" format="$1"}%"}%\b'
   AND TopicType=~'\b%TYPE%\b' 
   %IF{"defined NOTTYPE" then=" AND !(TopicType=~'\b%NOTTYPE%\b')"}%"
   web="%IF{"defined THEWEB" then="%THEWEB%" else="%BASEWEB%"}%"
   hidenull="on"
   remote="off"
   header="<div class='twbDocuHolder'>
---+++ %TYPE%$n"
   format="<div class='twbDocuSectionHolder'>
---++++ <nop>$topic
<div class='twbDocuSectionSummary'>$formfield(Summary)</div>
<div class='twbDocuSectionText'>$expand(_sectiondocumentation) ... [[$web.$topic][read more]]</div>
</div>"
   separator="$n"
  footer="</div>"
}%
<!-- //render application documentation -->%STOPINCLUDE%

Test

TopicFunction

GetTopicTypes

returns a list of TopicTypes known in the base web
This is a "getter" TopicFunction that returns a list of known TopicTypes in a given web. Use it to create a selection in DataForms for the TopicType formfield. It adds the "none" type so that you can have (temporarily) un-typed topics. The type "TopicType" is added hardcoded so that you don't have to rely on that type being present in your web and to allow bootstrapping a type system in a web from scratch on as you will be able to create an initial TopicType TopicType this way.

Parameters
  • WEBS: list of webs to search for TopicTypes, defaults to BASEWEB
  • EXCLUDE: expression to exclude types (optional)
  • ADDITION: types that are listed additionally (optional)

... read more

RenderApplicationDocumentation

Extracts the documentation section from all parts of a WikiApplication
Parameters
  • NAME: application name, defaults to BASEWEB
  • THEWEB: web to search for docu, defaults to BASEWEB
  • TYPE: extract documentation of topics of the given type
  • NOTTYPE: don't list topics of that type

Css
  • twbDocuHolder
  • twbDocuSectionHolder
  • twbDocuSectionSummary
  • twbDocuSectionText ... read more

RenderApplicationManifest

Render a list of all files making up a given application

RenderDataFormList

Renders a list of DataForms that make use of the given DataFormAttribute
Parameters

RenderFunctionCallers

Render a list of topics that use a given TopicFunction

RenderImageSelector

Renders a widget to select an image attached to a topic
Select an image attached to a SOURCE topic

Parameters
  • SELECTED
  • SOURCE
  • DEFAULT
  • FIELDNAME

... read more

RenderIndexItem

Fallback to render a summary for WikiTopic that does not have a type specific version of to render an index item
This method is called by RenderCategory to display a summary for an object. This method serves as a final fallback when no other TopicType-specific method was found.

Parameters
  • OBJECT

... read more

RenderSideBar

Render the sidebar navigation for the WikiWorkbench?

RenderSimpleTopicCreator

TopicFunction to display a simple form to create a new topic
This function renders a topic creator form that holds a set of initial input elements to create a topic.

Parameters
  • TEXT: headline text; defaults to "Create a new INCLUDINGTOPIC"
  • LABEL: label of the TopicTitle field, defaults to "Title"
  • BUTTONTEXT: text on the twisty buttinm; default New
  • VALUE: initial value of the title input field (optional)
  • TOPICVALUE: initial value of the topic input field, e.g. SomeTopicAUTOINC0
  • FORM: DataForm to be used when creating a topic, defaults to WikiTopic
  • TEMPLATE: TopicTemplate to be used (optional)
  • TYPE: initial TopicType value, defaults to values predefined in the form definition
  • PARENT: parent topic for the new topic, defaults to the BASETOPIC
  • WHITEBOARD: switch on/off the whiteboard textarea
  • EXTRA: additional <input … />
  • ACTION: script to be used to create the topic, eg save or edit, defaults to edit
  • EDITOR: TopicView to be used as an edit_template

... read more

RenderTopicInstaller

Render a simple factory to deploy a topic in another web
This is a tool to add a topic based application, or part of it to another web. This is done by creating a TopicStub that points back to the implementation. For example, to add a new TopicType to web, you create a TopicStub that points back to the implementation of that TopicType.

The function will display a small input form to specify the web where the TopicStub is to be created.

Parameters
  • TEXT: headline for the install form, defaults to "Install BASETOPIC"
  • NAME: name of the topic to be created, defaults to BASETOPIC
  • SOURCE: used to specify the TopicStub's target to be created, defaults to BASEWEB.BASETOPIC
  • PARENT: topicparent of the new topic, defaults to HOMETOPIC
  • TEMPLATE: TopicTemplate used to create this topic, defaults to TopicStubTemplate
  • FORM: DataForm used for this topic, defaults to TopicStub
  • TYPE: type of the new topic, defaults to TopicStub
  • WIKIAPP: the name of the WikiApllication? this topic belongs to, defaults to BASEWEB
  • EXTRA: extra stuff to be send during save

... read more

RenderTopicThumbnail

Display thumbnail image for a topic
This function gets the first image attachment from a topic and creates a 48x48 thumbnail using ImagePlugin. The attachment taken must end with jpeg, jpg, gif, bmp, svg or png. If there are multiple image attachments then the first one ordered by comment and name is taken. The empty string is returned if no image attachment is found.

Parameters
  • OBJECT: topic to generate a thumbnail for
  • ALIGN: optional alignment of image, defaults to right
  • SIZE: optional size of thumbnail
  • TYPE: image rendering type, see documentation of ImagePlugin, defaults to simple
  • CROP
  • SORT: specifies which image to chose from the attachments, defaults to comment:name which will take the one that sorts first wrt the comment, falling back to the name

... read more

RenderTopicsOfType

Display a table of topcis of a given type
Parameters
  • TYPE: the TopicType to be searched for, defaults to BASETOPIC
  • FIELDS: columns of formfields to display, defaults to Topic, Summary, WikiApplication, Changed
  • ROWS: number of rows to display initially, defauts to 10
  • FILTER: additional filter expression (optional)
  • THEWEB: web to examin, defaults to BASEWEB
  • <field_name>_title: column title for the given field ... read more

RenderWikiApplicationFactory

Renders a form to create a new WikiApplication
This is used to create a new WikiApplication

... read more

RenderWikiApplicationWebHome

Renders a dashboard for an application web
Renders the Applications of a WikiApplication subweb

Parameters
None

... read more

RenderWikiTopicEditor

This function renders an editor for a normal WikiTopic to be displayed at the topic of the text tab.

Parameters

  • BASETOPIC
  • FORM: name of the form definition, defaults to Applications.WikiTopic
  • FIELDS: fields to be edited, defaults to TopicTitle, Summary

... read more

RenderWikiTopicView

This function renders a view for a wiki topic, showing its title and the summary line.

Parameters

  • TITLE_EXTRA: optional addition put behind the topic title

... read more

Calls to 'RenderApplicationDocumentation'

Copyright

© 2006-2013 Michael Daum http://michaeldaumconsulting.com

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ApplicationTopic edit

TopicType TopicFunction
TopicTitle
Summary Extracts the documentation section from all parts of a WikiApplication
WikiApplication WikiWorkbench
Topic revision: r1 - 23 Dec 2012, ProjectContributor
 

Das Urheberrecht © liegt bei den mitwirkenden Autoren. Alle Inhalte dieser Kollaborations-Plattform sind Eigentum der Autoren.