RenderApplicationDocumentation
Extracts the documentation section from all parts of a WikiApplication

02 May 2019 - 09:27 | Version 1 |

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%
%DBQUERY{
   "WikiApplication='\b%NAME{default="%EXTRACT{text="%BASEWEB%" pattern=".*/(.+?)$" format="$1"}%"}%\b'
   AND TopicType=~'\b%TYPE%\b' 
   %IF{"defined NOTTYPE" then=" AND !(TopicType=~'\b%NOTTYPE%\b')"}%"
   web="%THEWEB{default="%BASEWEB%"}%"
   hidenull="on"
   header="<div class='twbDocuHolder'>
---+++ [[%TYPE%]]$n"
   format="<div class='twbDocuSectionHolder'>
---++++ [[$topic]]
<div class='twbDocuSectionSummary'>$formfield(Summary)</div>
<div class='twbDocuSectionText'>$percntDBCALL{\"$web.$topic\" section=\"documentation\" warn=\"off\"}$percnt
... [[$web.$topic][%MAKETEXT{"read more"}%]]</div>
</div>"
   separator="$n"
  footer="</div>"
}%
%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
  • ATTR: DataFormAttribute to search for, defaults to BASETOPIC
  • THEWEB: web to examin, defaults to BASEWEB

read more

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 OBJECT topic

Parameters
  • OBJECT, default BASEWEB.BASETOPIC
  • SELECTED
  • FIELDNAME
  • EXTENSIONS, defaults to jpe?g|JPE?G|gif|GIF|png|PNG|svg|SVG|webp|WEBP

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

RenderInheritanceGraph

a directed graph of TopicType inheritance
This function requires GraphvizPlugin

read more

RenderRecentChanges

renders a list of recent changes in a web
This uses solr and infintescroll to create a frontpage widget.

Parameters
  • HEIGHT: height of scroll container, defaults to 40em
  • LIMIT: number of rows to render, defaults to 20
  • PAGE: from which page to start rendering
  • THEWEB: the web to render recent changes for
  • FILTER: filter to be added to the search query

read more

RenderRss

default implementation of an rss view of a single topic
This method is called by RssViewTemplate for each topic found. Note that this is a base-implementation for all TopicTypes processed. Individual TopicTypes may implement their own version called MyTopicTypeRenderRss. These are then called automatically using the %DBCALL{"web.topic->RenderRss"}% method call of the RssViewTemplate.

Parameters
  • OBJECT: the current topic

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)
  • VALUES: map of initial values to formfields; format is <fieldName1>=<value1>;<fieldName2>=<value2>;...
  • FORM: DataForm to be used when creating a topic, defaults to INCLUDINGWEB.INCLUDINGTOPIC
  • 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 formfields
  • SCRIPT: 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
  • TOOLTIP: switch on/off tooltips for thumbnails, defaults to on
  • 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 TopicTitle, Summary, WikiApplication, Changed
  • SORT: sorting of rows, defaults to "Changed"
  • REVERSE: sorting direction, defaults to "off", defaults to "on" if SORT="Changed"
  • ROWS: number of rows to display initially, defauts to 10
  • FILTER: additional filter expression (optional)
  • THEWEB: web to examin, defaults to BASEWEB
  • ROWNUMBERS: boolean toggle to switch on/off row numbers
  • SELECTING: boolean toggle to switch on/off row selection, defaults to off
  • SEARCHMODE: either have one single search box using global or one per column using multi, default global
  • <field_name>_title: column title for the given field
  • <field_name>_width: column width 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

RenderWikiTopicView

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

Parameters

  • OBJECT: the topic to render the view for, defaults to %BASEWEB%.%BASETOPIC%
  • TITLE_PREFIX: optional string put before the topic title
  • TITLE_EXTRA: optional addition put behind the topic title
  • DISPLAYREVISIONINFO: boolean flag to switch on/off revinfo rendered underneath the h1 element

read more

Calls to 'RenderApplicationDocumentation'

Copyright

© 2006-2019 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.
This site is powered by FoswikiCopyright © 2002-2024 by contributors to Wasserstoff-Fahrer Forum ImpressumDatenschutz  Feedback
This website is using cookies. More info. That's Fine