You are here:
Foswiki
>
Applications Web
>
TopicType
>
TopicFunction
>
GetTopicTypes
E
dit
A
ttach
Tags:
create new tag
,
view all tags
%TOC{depth="2"}% ---++ Documentation %STARTSECTION{"documentation"}% 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) %ENDSECTION{"documentation"}% ---++ Implementation <verbatim class="tml"> %STARTINCLUDE%none, %FORMATLIST{ "TopicType, %IF{"defined ADDITION" then="%ADDITION%, "}% %FORMATLIST{ "%IF{"defined WEBS" then="%WEBS%" else="%BASEWEB%"}%" format="$percntDBQUERY{\"TopicType=~'\bTopicType\b'\" web=\"$1\" hidenull=\"on\" separator=\", \" format=\"$dollartopic\" }$percnt" }%" %IF{"defined EXCLUDE" then="exclude=\"%EXCLUDE%\""}% format="$1" separator=", " sort="on" unique="on" }%%STOPINCLUDE% </verbatim> ---++ Test <noautolink> <div class="alt"> %DBCALL{"%TOPIC%" ADDITION="FooBar" EXCLUDE="Application.*"}% </div> <div class="alt"> %DBCALL{"%TOPIC%" WEBS="Applications.ClassificationApp, %BASEWEB%"}% </div> </noautolink> %DBCALL{"Applications.RenderFunctionCallers"}% ---++ Copyright © 2006-2013 Michael Daum http://michaeldaumconsulting.com %DBCALL{"Applications.GnuGeneralPublicLicense" section="notice"}%
ApplicationTopic
edit
TopicType
DocuTopic
,
TopicFunction
TopicTitle
Summary
returns a list of
TopicTypes
known in the base web
WikiApplication
WikiWorkbench
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r1 - 02 Mar 2012,
ProjectContributor
Applications
Log In
or
Register
Tools
TopicTypes
DataForms
DataFormAttributes
TopicTemplates
TopicViews
TopicFunctions
Webs
Applications
ClassificationApp
Extensions
Main
System
Das Urheberrecht © liegt bei den mitwirkenden Autoren. Alle Inhalte dieser Kollaborations-Plattform sind Eigentum der Autoren.