Renders general layout for ClassificationTopics.
Documentation
RenderClassificationTopic is INCLUDED in Classification topics within the specific webs where
TopicClassification is used. It includes a SEARCH to list all topics that have that classification as well as filtering by that classifications "facets."
Parameters
The following parameters allow customization of how specific Classification topics are displayed. Most can be specified within the INCLUDE or DBCALL but in many cases, it is easier to define them within the base Classification topic. For convenience, all new Classification topics have these listed in a hidden section at the beginning of the topic.
- CLASS_DESCRIPTION - Optional introductory information about the particular category.
- CLASS_NAME - Optional designation of alternative reference for the Classification the current topic falls under. This provides for nested classifications.
- LISTFORMAT - Optional designation of topic that defines how the list of topics are displayed. Defaults to RenderTableSearchResults. RenderBlogList is an example of alternative format.
- INITSORT - Optionally set initial sort. Defaults to "modified".
- INITLIMIT - Optionally set initial limit to # of results. Defaults to "all".
- REVERSE - Optionally to reverse the search order. Defaults to "off."
- CREATELINK - Optionally set to "no" to over-ride default of having "Create New XX" button for TopicType topics. Set to "yes" for force include button. In this case, their must be a section called "new" that defines the form for posting new topics. See TopicType topics for example. If set to any other sting, that string will be displayed. If not defined (the default) then the button is included in TopicType topics.
Css
Implementation
%STARTINCLUDE%
<span class="foswikiRight" style="margin:.25em 0 0 0;" /><form name="browseSubjects" action="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%BASEWEB%/" >
<select name="subject" size="1" onchange="document.location=this.value;">
<option>Jump to different <nop>%FORMFIELD{"%IFDEFINED{"%CLASS_NAME%" then="$test" else="Classification" glue="off"}%" topic="%BASEWEB%.%BASETOPIC%"}%...</option>
~~~
%~~ DBQUERY{ "%IFDEFINED{"%CLASS_NAME%" then="$test" else="Classification" glue="off"}%
~~~ ='%FORMFIELD{"%IFDEFINED{"%CLASS_NAME%" then="$test" else="Classification" glue="off"}%" topic="%BASEWEB%.%BASETOPIC%"}%'"
~~~ web="%BASEWEB%"
~~~ exclude="%BASETOPIC%"
~~~ order="topic"
~~~ format= "<option>$topic</option>"
~~~ }% </select></form> </span>
---++!! %SPACEOUT{%BASETOPIC%}%
%IF{"defined CLASS_DESCRIPTION" then="%CLASS_DESCRIPTION%"}%
%IFDEFINEDTHEN{"%IFACCESS{"%BASEWEB%.WebNotify" type="change"}%" as="1" glue="off"}%
%IFDEFINEDTHEN{"%CREATELINK%" as="no" glue="off"}%
%ELSIFDEFINED{"%CREATELINK%" as="yes" }%
%INCLUDE{"%TOPIC%" section="createlink"}%
%ELSIFDEFINED{"%CREATELINK%" as="..*" }%
$test
%ELSEDEFINED%
%STARTSECTION{"createlink"}%
%~~ IFDEFINED{"%FORMFIELD{"Classification" topic="%BASEWEB%.%BASETOPIC%"}%"
~~~ as="TopicType"
~~~ then="<p /><form method=\"link\"
~~~ action=\"$percntSCRIPTURL{view}$percnt/$percntBASEWEB$percnt/CreateNewTopic\">
~~~ <input type=hidden name=type value=$percntBASETOPIC$percnt>
~~~ <input type=hidden name=step value=two>
~~~ <input type=hidden name=parent value=$percntBASETOPIC$percnt>
~~~ <input type=\"submit\" class=\"foswikiButton\" value=\"Create new <nop>$percntBASETOPIC$percnt \" />
~~~ </form>"
~~~ glue="off"
~~~ }%
%ENDSECTION{"createlink"}%
%FIDEFINED%%FIDEFINED%
%~~ IFDEFINED{"
*~~
%~~ DBQUERY{"parent = '%BASETOPIC%'
~~~ AND Classification = '%FORMFIELD{"Classification" topic="%BASEWEB%.%BASETOPIC%"}%'"
~~~ web="%BASEWEB%"
~~~ format="none"
~~~ header="$count"
~~~ hidenull="on"
~~~ }%"
~~~ then="<em>See also sub-%FORMFIELD{"Classification" topic="%BASEWEB%.%BASETOPIC%"}%s:
~~~ $percntDBQUERY{\"parent = '%BASETOPIC%'
~~~ AND Classification = '%FORMFIELD{"Classification" topic="%BASEWEB%.%BASETOPIC%"}%'\"
~~~ web=\"%BASEWEB%\"
~~~ format=\"$web.$topic\"
~~~ separator=\", \"
~~~ }$percnt</em>"
~~~ glue="off"
~~~ }%
%IFDEFINEDTHEN{"%LISTFORMAT%" glue="off" }%
%DBCALL{"%LISTFORMAT%" %IF{"defined FACET" then="FACETS=\"$percntFACETS$percnt\"" }% }%
%ELSEDEFINED%
%~~ DBCALL{"%TCAOWEB%.RenderTableSearchResults"
~~~ FACETS="%FORMFIELD{"Facets" topic="%BASEWEB%.%BASETOPIC%"}%"
~~~ EXCLUDE="null"
~~~ BASESEARCH="%IFDEFINED{"%CLASS_NAME%"
~~~ then="$test"
~~~ else="%FORMFIELD{"Classification" topic="%BASEWEB%.%BASETOPIC%"}%"}%
~~~ = '.*\b%BASETOPIC%\b.*'" }%
~~~ %FIDEFINED%
_For more information on content organization within the *%BASEWEB%* web, see %BASEWEB%.TopicClassification._
%STOPINCLUDE%
Test
Render Classification Topic
Bad search at /var/www/foswiki/lib/Foswiki/Contrib/DBCacheContrib/Search.pm line 146.
For more information on content organization within the TCAO web, see TopicClassification.
Calls to 'RenderClassificationTopic'
Copyright
(C) 2006
LynnwoodBrown@Skyloom.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.