Knowledge.Departments.IT.WebHome
, IT
is the WebName
Knowledge.Departments.IT.WebHome
has got the TopicTitle "IT Knowledgebase", then the link [[Knowledge.Departments.IT.WebHome]]
will render as <a href="/bin/view/Knowledge/Departments/IT/WebHome">IT Knowledgebase</a>
The TopicTitle is stored in one of these places:
TOPICTITLE_<lang>
TOPICTITLE
.
(lang: upper case language code, eg. EN or DE)
If a DataForm does not have a formfield "TopicTitle" or no DataForm at all will the TopicTitle be stored in the preference settingTOPICTITLE
.
You may change the name of the formfield being used as a TopicTitle using the TOPICTITLE_FIELD
preference setting to this topic. For example,
given you specified a DataForm "SystemForm" with a formfield "SystemName", the set TOPICTITLE_FIELD
to "SystemName" to store the TopicTitle in there instead.
Note that in case that the TopicTitle is identical to its TopicName no TOPICTITLE
prefrence will be set.
WARNING: When adding, changing or removing a DataForm holding a TopicTitle will it potentially be lost when editing and saving the topic.
There are multiple ways to read the TopicTitle:
%TOPICTITLE%
: expands to the preference setting within a topic
%FORMFIELD{"TopicTitle"}%
: read the formfield value
%QUERY{"'%TOPIC%'/preferences[name='TOPICTITLE'].value"}%
: read the preference setting of a topic
%GETTOPICTITLE{...}%
Parameters | Description | Default |
---|---|---|
"..." or topic="..." |
name of the topic to read the title of | current topic |
rev="..." |
revision of the topic | latest revision |
default="..." |
default string to return in case the topic does not have a TopicTitle | TopicName |
hideautoinc="on/off" |
boolean to suppress a return value in case the TopicName matches ...AUTOINC or ...XXXXXXXXXX |
off |
encode="quotes/url/entity/safe" |
encode the result in the given way. See also VarENCODE |
Foswiki::Func::getTopicTitle($web, $topic, $rev)
for Foswiki versions before 2.2.0. You may also access the
plugin's API directly using Foswiki::Plugins::TopicTitlePlugin::getTopicTitle(...)
.
This plugin sets the TopicTitleEnabled
context flag that may be used in wiki applications depending on this feature. See IfStatements
on how to read the context flags using the %IF
makro.
cd /path/to/foswiki perl tools/extension_installer <NameOfExtension> installIf you have any problems, or if the extension isn't available in
configure
, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.
05 Mar 2022 | add "safe" encoding mode |
01 Apr 2020 | added support for multilingual topic titles |
14 Aug 2018 | fixed renaming a topic changing subsequent topics being saved during the same request |
28 May 2018 | improved parsing of topic and web parameter |
06 Apr 2018 | initial version |
Author | Michael Daum |
Version | 2.10 |
Release | 05 Mar 2022 |
Description | Free-form title for topics |
Repository | https://github.com/foswiki/TopicTitlePlugin |
Copyright | 2018-2022 Foswiki Contributors |
License | GPL (GNU General Public License) |
Home | https://foswiki.org/Extensions/TopicTitlePlugin |
Support | https://foswiki.org/Support/TopicTitlePlugin |