CINXE.COM
plugin:tag [DokuWiki]
<!DOCTYPE html> <html lang="en" dir="ltr" class="no-js"> <head> <meta charset="utf-8" /> <title>plugin:tag [DokuWiki]</title> <meta name="generator" content="DokuWiki"/> <meta name="theme-color" content="#008800"/> <meta name="robots" content="index,follow"/> <meta name="keywords" content="plugin,tag"/> <link rel="search" type="application/opensearchdescription+xml" href="/lib/exe/opensearch.php" title="DokuWiki"/> <link rel="start" href="/"/> <link rel="contents" href="/plugin:tag?do=index" title="Sitemap"/> <link rel="manifest" href="/lib/exe/manifest.php"/> <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="/feed.php"/> <link rel="alternate" type="application/rss+xml" title="Current namespace" href="/feed.php?mode=list&ns=plugin"/> <link rel="edit" title="Edit this page" href="/plugin:tag?do=edit"/> <link rel="alternate" type="text/html" title="Plain HTML" href="/_export/xhtml/plugin:tag"/> <link rel="alternate" type="text/plain" title="Wiki Markup" href="/_export/raw/plugin:tag"/> <link rel="canonical" href="https://www.dokuwiki.org/plugin:tag"/> <link rel="stylesheet" href="/lib/exe/css.php?t=dokuwiki&tseed=f1005bad3d81fc9c803c7f93d32a390e"/> <script >var NS='plugin';var JSINFO = {"plugins":{"edittable":{"default columnwidth":""}},"id":"plugin:tag","namespace":"plugin","ACT":"show","useHeadingNavigation":0,"useHeadingContent":0};(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" defer="defer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js" defer="defer"></script> <script src="/lib/exe/js.php?t=dokuwiki&tseed=f1005bad3d81fc9c803c7f93d32a390e&lang=en" defer="defer"></script> <meta name="viewport" content="width=device-width,initial-scale=1" /> <link rel="shortcut icon" href="/lib/tpl/dokuwiki/images/favicon.ico" /> <link rel="apple-touch-icon" href="/lib/tpl/dokuwiki/images/apple-touch-icon.png" /> <meta name="verify-v1" content="OVxl3gsCv2MhZqh1cBQyl0JytWXSwXMjyvwc+4w3WtA=" /> <meta name="google-site-verification" content="YhTVK69hW94ZXUtc2zSLPxTkZKbZIn0zK67mz5WQB-E" /> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-83791-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-83791-1', { 'anonymize_ip': true }); </script> </head> <body> <div id="dokuwiki__site"><div id="dokuwiki__top" class="site dokuwiki mode_show tpl_dokuwiki showSidebar hasSidebar"> <!-- ********** HEADER ********** --> <header id="dokuwiki__header"><div class="pad group"> <div class="headings group"> <ul class="a11y skip"> <li><a href="#dokuwiki__content">skip to content</a></li> </ul> <h1 class="logo"><a href="/start" accesskey="h" title="Home [h]"><img src="/lib/tpl/dokuwiki/images/logo.png" width="64" height="64" alt="" /><span>DokuWiki</span></a></h1> <p class="claim">It's better when it's simple</p> </div> <div class="tools group"> <!-- USER TOOLS --> <div id="dokuwiki__usertools"> <h3 class="a11y">User Tools</h3> <ul> <li class="action login"><a href="/plugin:tag?do=login&sectok=" title="Log In" rel="nofollow"><span>Log In</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 17.25V14H3v-4h7V6.75L15.25 12 10 17.25M8 2h9a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-4h2v4h9V4H8v4H6V4a2 2 0 0 1 2-2z"/></svg></a></li> </ul> </div> <!-- SITE TOOLS --> <div id="dokuwiki__sitetools"> <h3 class="a11y">Site Tools</h3> <form action="/start" method="get" role="search" class="search doku_form" id="dw__search" accept-charset="utf-8"><input type="hidden" name="do" value="search" /><input type="hidden" name="id" value="plugin:tag" /><div class="no"><input name="q" type="text" class="edit" title="[F]" accesskey="f" placeholder="Search" autocomplete="on" id="qsearch__in" value="" /><button value="1" type="submit" title="Search">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form> <div class="mobileTools"> <form action="/doku.php" method="get" accept-charset="utf-8"><div class="no"><input type="hidden" name="id" value="plugin:tag" /><select name="do" class="edit quickselect" title="Tools"><option value="">Tools</option><optgroup label="Page Tools"><option value="edit">Edit this page</option><option value="revisions">Old revisions</option><option value="backlink">Backlinks</option></optgroup><optgroup label="Site Tools"><option value="recent">Recent Changes</option><option value="media">Media Manager</option><option value="index">Sitemap</option></optgroup><optgroup label="User Tools"><option value="login">Log In</option></optgroup></select><button type="submit">></button></div></form> </div> <ul> <li class="action recent"><a href="/plugin:tag?do=recent" title="Recent Changes [r]" rel="nofollow" accesskey="r">Recent Changes</a></li><li class="action media"><a href="/plugin:tag?do=media&ns=plugin" title="Media Manager" rel="nofollow">Media Manager</a></li><li class="action index"><a href="/plugin:tag?do=index" title="Sitemap [x]" rel="nofollow" accesskey="x">Sitemap</a></li> </ul> </div> </div> <!-- BREADCRUMBS --> <div class="breadcrumbs"> <div class="trace"><span class="bchead">Trace:</span> <span class="bcsep">•</span> <span class="curid"><bdi><a href="/plugin:tag" class="breadcrumbs" title="plugin:tag">tag</a></bdi></span></div> </div> <hr class="a11y" /> </div></header><!-- /header --> <div class="wrapper group"> <!-- ********** ASIDE ********** --> <nav id="dokuwiki__aside" aria-label="Sidebar"><div class="pad aside include group"> <h3 class="toggle">Sidebar</h3> <div class="content"><div class="group"> <p> <strong>Learn about DokuWiki</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/features" class="wikilink1" title="features" data-wiki-id="features">Features</a> & <a href="/blogroll" class="wikilink1" title="blogroll" data-wiki-id="blogroll">reviews</a> </div> </li> <li class="level1"><div class="li"> <a href="/install" class="wikilink1" title="install" data-wiki-id="install">Installation guide</a></div> </li> <li class="level1"><div class="li"> <a href="/manual" class="wikilink1" title="manual" data-wiki-id="manual">User manual</a> & <a href="/wiki:syntax" class="wikilink1" title="wiki:syntax" data-wiki-id="wiki:syntax">syntax</a></div> </li> <li class="level1"><div class="li"> <a href="/changes" class="wikilink1" title="changes" data-wiki-id="changes">Release notes</a></div> </li> <li class="level1"><div class="li"> <a href="/faq" class="wikilink1" title="faq" data-wiki-id="faq">FAQ</a></div> </li> </ul> <p> <strong>Advanced Use</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/extensions" class="wikilink1" title="extensions" data-wiki-id="extensions">Extensions</a></div> </li> <li class="level1"><div class="li"> <a href="/development" class="wikilink1" title="development" data-wiki-id="development">Development manual</a></div> </li> </ul> <p> <strong>Corporate Use</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/faq:support" class="wikilink1" title="faq:support" data-wiki-id="faq:support">Get support</a></div> </li> <li class="level1"><div class="li"> <a href="/donate" class="wikilink1" title="donate" data-wiki-id="donate">Donations</a></div> </li> </ul> <p> <strong>Our Community</strong> </p> <ul> <li class="level1"><div class="li"> <a href="/teams:getting_involved" class="wikilink1" title="teams:getting_involved" data-wiki-id="teams:getting_involved">Get involved</a></div> </li> <li class="level1"><div class="li"> <a href="/dokuinstall" class="wikilink1" title="dokuinstall" data-wiki-id="dokuinstall">Users</a></div> </li> <li class="level1"><div class="li"> <a href="http://forum.dokuwiki.org" class="urlextern" title="http://forum.dokuwiki.org">User forum</a></div> </li> <li class="level1"><div class="li"> <a href="/mailinglist" class="wikilink1" title="mailinglist" data-wiki-id="mailinglist">Development mailinglist</a></div> </li> </ul> <hr /> <p> Follow us on <a href="https://phpc.social/@dokuwiki" class="urlextern" title="https://phpc.social/@dokuwiki">Mastodon</a> and other <a href="/social" class="wikilink1" title="social" data-wiki-id="social">social networks</a>. </p> <p> <a href="/privacy" class="wikilink1" title="privacy" data-wiki-id="privacy">Our Privacy Policy</a> </p> </div></div> </div></nav><!-- /aside --> <!-- ********** CONTENT ********** --> <main id="dokuwiki__content"><div class="pad group"> <div class="pageId"><span>plugin:tag</span></div> <div class="page group"> <!-- wikipage start --> <!-- TOC START --> <div id="dw__toc" class="dw__toc"> <h3 class="toggle">Table of Contents</h3> <div> <ul class="toc"> <li class="level1"><div class="li"><a href="#tag_plugin">Tag Plugin</a></div> <ul class="toc"> <li class="level2"><div class="li"><a href="#description">Description</a></div></li> <li class="level2"><div class="li"><a href="#components">Components</a></div> <ul class="toc"> <li class="level3"><div class="li"><a href="#tag">Tag</a></div></li> <li class="level3"><div class="li"><a href="#topic">Topic</a></div></li> <li class="level3"><div class="li"><a href="#searchtags">Searchtags</a></div></li> <li class="level3"><div class="li"><a href="#count">Count</a></div></li> <li class="level3"><div class="li"><a href="#tagpage">Tagpage</a></div></li> </ul> </li> <li class="level2"><div class="li"><a href="#configuration">Configuration</a></div></li> <li class="level2"><div class="li"><a href="#tagindex_rebuild">Tagindex Rebuild</a></div></li> <li class="level2"><div class="li"><a href="#demo_screenshots">Demo / Screenshots</a></div></li> <li class="level2"><div class="li"><a href="#changes">Changes</a></div></li> <li class="level2"><div class="li"><a href="#sites_using_this_plugin">Sites using this Plugin</a></div></li> <li class="level2"><div class="li"><a href="#faq">FAQ</a></div> <ul class="toc"> <li class="level3"><div class="li"><a href="#how_to_use_tags_which_consist_of_multiple_words">How to use tags which consist of multiple words?</a></div></li> <li class="level3"><div class="li"><a href="#how_to_make_the_tag_namespace_breadcrumb_still_work">How to make the tag namespace breadcrumb still work</a></div></li> <li class="level3"><div class="li"><a href="#change_css_styles_depending_on_existing_tags">Change CSS styles depending on existing tags</a></div></li> <li class="level3"><div class="li"><a href="#customizing_the_breadcrumbs">Customizing the breadcrumbs</a></div></li> <li class="level3"><div class="li"><a href="#bad_appearance_when_displaying_tags_at_top_of_page">Bad appearance when displaying tags at top of page</a></div></li> <li class="level3"><div class="li"><a href="#how_to_change_the_word_tag_and_topic_to_another_language">How to change the word tag and topic to another language</a></div></li> </ul> </li> <li class="level2"><div class="li"><a href="#discussion">Discussion</a></div> <ul class="toc"> <li class="level3"><div class="li"><a href="#pagelist_with_alphabetical_headers">Pagelist With Alphabetical Headers</a></div></li> <li class="level3"><div class="li"><a href="#collapsible_outline_of_all_tags">Collapsible outline of all tags</a></div></li> </ul></li> </ul></li> </ul> </div> </div> <!-- TOC END --> <h1 class="sectionedit1" id="tag_plugin">Tag Plugin</h1> <div class="level1"> <div class="pluginrepo_entry"><div class="usageInfo"><div class="compatibility"><p class="label">Compatible with DokuWiki</p><div class="versions"><ul><li class="">2024-02-06 "Kaos" <strong><span>unknown</span></strong></li><li class="yes">2023-04-04 "Jack Jackrum" <strong><span>yes</span></strong></li><li class="yes">2022-07-31 "Igor" <strong><span>yes</span></strong></li><li class="yes">2020-07-29 "Hogfather" <strong><span>yes</span></strong></li></ul></div></div><ul class="actions"><li><a class="download" href="https://github.com/dokufreaks/plugin-tag/tarball/master">Download</a></li><li><a class="bugs" href="https://github.com/dokufreaks/plugin-tag/issues">Report bugs</a></li><li><a class="donate" href="http://www.content-space.de/dokuwiki/donate">Donate</a></li></ul><div class="clearer"></div></div><div class="mainInfo"><p class="description"><a class="media" href="/plugins"><img alt="plugin" class="medialeft" src="/lib/plugins/pluginrepo/images/dwplugin.png" width="60" height="60" /></a> Assign category tags to wiki pages</p></div><div class="metaInfo"><dl><dt>Last updated on</dt><dd>2023-10-17</dd><dt>Provides</dt><dd><a href="/plugins?plugintype=1#extension__table" class="wikilink1" title="List all Syntax plugins">Syntax</a>, <a href="/plugins?plugintype=16#extension__table" class="wikilink1" title="List all Helper plugins">Helper</a>, <a href="/plugins?plugintype=4#extension__table" class="wikilink1" title="List all Action plugins">Action</a></dd><dt>Repository</dt><dd><a class="urlextern" href="https://github.com/dokufreaks/plugin-tag">Source</a></dd><dt>Requires</dt><dd><a href="/plugin:pagelist" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">pagelist</a></dd></dl></div><div class="moreInfo"><p class="similar">Similar to <a href="/plugin:blogtng" class="wikilink1" title="plugin:blogtng" data-wiki-id="plugin:blogtng">blogtng</a>, <a href="/plugin:geotag" class="wikilink1" title="plugin:geotag" data-wiki-id="plugin:geotag">geotag</a>, <a href="/plugin:subjectindex" class="wikilink1" title="plugin:subjectindex" data-wiki-id="plugin:subjectindex">subjectindex</a>, <a href="/plugin:tagging" class="wikilink1" title="plugin:tagging" data-wiki-id="plugin:tagging">tagging</a>, <a href="/plugin:tagsections" class="wikilink1" title="plugin:tagsections" data-wiki-id="plugin:tagsections">tagsections</a></p><p class="tags">Tagged with <a href="/plugins?plugintag=blog#extension__table" class="wikilink1" title="List all plugins with this tag">blog</a>, <a href="/plugins?plugintag=listing#extension__table" class="wikilink1" title="List all plugins with this tag">listing</a>, <a href="/plugins?plugintag=navigation#extension__table" class="wikilink1" title="List all plugins with this tag">navigation</a>, <a href="/plugins?plugintag=tags#extension__table" class="wikilink1" title="List all plugins with this tag">tags</a></p><p class="needed">Needed for <a href="/plugin:editor" class="wikilink1" title="plugin:editor" data-wiki-id="plugin:editor">editor</a>, <a href="/plugin:feed" class="wikilink1" title="plugin:feed" data-wiki-id="plugin:feed">feed</a>, <a href="/plugin:tagadd" class="wikilink1" title="plugin:tagadd" data-wiki-id="plugin:tagadd">tagadd</a>, <a href="/plugin:tagalerts" class="wikilink1" title="plugin:tagalerts" data-wiki-id="plugin:tagalerts">tagalerts</a>, <a href="/plugin:tagbutton" class="wikilink1" title="plugin:tagbutton" data-wiki-id="plugin:tagbutton">tagbutton</a>, <a href="/plugin:tagentry" class="wikilink1" title="plugin:tagentry" data-wiki-id="plugin:tagentry">tagentry</a>, <a href="/plugin:tagfilter" class="wikilink1" title="plugin:tagfilter" data-wiki-id="plugin:tagfilter">tagfilter</a>, <a href="/plugin:tagsections" class="wikilink1" title="plugin:tagsections" data-wiki-id="plugin:tagsections">tagsections</a>, <a href="/template:tr-twitter" class="wikilink1" title="template:tr-twitter" data-wiki-id="template:tr-twitter">tr-twitter</a></p></div><div class="authorInfo"><strong>By <a href="mailto:freaks%20%5Bat%5D%20dokuwiki%20%5Bdot%5D%20org" class="mail" title="freaks [at] dokuwiki [dot] org">Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)</a></strong><ul><li><a href="/plugin:include" class="wikilink1" title="plugin:include" data-wiki-id="plugin:include">include</a></li> <li><a href="/plugin:cloud" class="wikilink1" title="plugin:cloud" data-wiki-id="plugin:cloud">cloud</a></li> <li><a href="/plugin:folded" class="wikilink1" title="plugin:folded" data-wiki-id="plugin:folded">folded</a></li> <li><a href="/plugin:task" class="wikilink1" title="plugin:task" data-wiki-id="plugin:task">task</a></li> <li><a href="/plugin:linkback" class="wikilink1" title="plugin:linkback" data-wiki-id="plugin:linkback">linkback</a></li> <li><a href="/plugin:keyboard" class="wikilink1" title="plugin:keyboard" data-wiki-id="plugin:keyboard">keyboard</a></li> <li><a href="/plugin:var" class="wikilink1" title="plugin:var" data-wiki-id="plugin:var">var</a></li> <li><a href="/plugin:poll" class="wikilink1" title="plugin:poll" data-wiki-id="plugin:poll">poll</a></li> <li><a href="/plugin:feed" class="wikilink1" title="plugin:feed" data-wiki-id="plugin:feed">feed</a></li> <li><a href="/plugin:charter" class="wikilink1" title="plugin:charter" data-wiki-id="plugin:charter">charter</a></li> <li>and 13 more</li></ul></div></div> </div> <div class="secedit editbutton_section editbutton_1"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Tag Plugin] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="tag_plugin" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="1-773" /><button type="submit" title="Tag Plugin">Edit</button></div></form></div> <h2 class="sectionedit2" id="description">Description</h2> <div class="level2"> <p> The Tag Plugin lets you assign category tags to wiki pages. </p> </div> <div class="secedit editbutton_section editbutton_2"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Description] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="description" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="774-862" /><button type="submit" title="Description">Edit</button></div></form></div> <h2 class="sectionedit3" id="components">Components</h2> <div class="level2"> </div> <div class="secedit editbutton_section editbutton_3"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Components] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="components" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="863-886" /><button type="submit" title="Components">Edit</button></div></form></div> <h3 class="sectionedit4" id="tag">Tag</h3> <div class="level3"> <p> Add a tag to the page </p> <pre class="code">{{tag>[list of tags]}}</pre> <div class="table sectionedit5"><table class="inline"> <tr class="row0"> <th class="col0 leftalign"> [list of tags] </th><td class="col1 leftalign"> a space separated list of tags that describe the content of the current page </td><td class="col2 leftalign"> required </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_5"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table" /><input type="hidden" name="range" value="950-1061" /><button type="submit" title="Table">Edit</button></div></form></div> <p> Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links. </p> <p> Examples: </p> <ul> <li class="level1"><div class="li"> <code>{{tag>tag1 tag2 tag3}}</code> </div> </li> <li class="level1"><div class="li"> with namespaces: <code>{{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}}</code></div> </li> <li class="level1"><div class="li"> multiple word tags: <code>{{tag>tag1_with_multiple_words tag2 tag3_part}}</code></div> </li> <li class="level1"><div class="li"> <code>{{tag>"tag with spaces" tag2}}</code> – Within quotes you can use spaces. Tag is stored internally with underscores <code>_</code>.</div> </li> </ul> </div> <div class="secedit editbutton_section editbutton_4"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Tag] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="tag" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="887-1774" /><button type="submit" title="Tag">Edit</button></div></form></div> <h3 class="sectionedit6" id="topic">Topic</h3> <div class="level3"> <p> List all pages with given tags. </p> <pre class="code">{{topic>[tag]&[flags]}}</pre> <div class="table sectionedit7"><table class="inline"> <tr class="row0"> <th class="col0 leftalign"> [tag] </th><td class="col1 leftalign"> the category tag for which you want a list of pages </td><td class="col2 leftalign"> required </td> </tr> <tr class="row1"> <th class="col0 leftalign"> [flags] </th><td class="col1 leftalign"> pagelist flags delimited by <code>&</code>, see <a href="/plugin:pagelist#flags" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">flags</a> </td><td class="col2 leftalign"> optional </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_7"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table1" /><input type="hidden" name="range" value="1851-2022" /><button type="submit" title="Table">Edit</button></div></form></div> <p> This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers <code>+</code> and <code>-</code>: </p> <ul> <li class="level1"><div class="li"> If you do not prepend, it acts as a OR. A page is added if it has one of these tags.</div> </li> <li class="level1"><div class="li"> <code>+</code> creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the <code>+</code> (AND), so each listed page must have this tag.</div> </li> <li class="level1"><div class="li"> <code>-</code> removes all pages tagged with the given tag from the list of already found pages (NOT).</div> </li> </ul> <p> Example: </p> <ul> <li class="level1"><div class="li"> <code>{{topic>tag1 -tag2}}</code> – Lists all pages tagged with tag1 but not with tag2.</div> </li> <li class="level1"><div class="li"> <code>{{topic>tag1 +tag2}}</code> – Lists all pages tagged with tag1 and tag2.</div> </li> <li class="level1"><div class="li"> <code>{{topic>tag1 tag2}}</code> – Lists all pages tagged with either tag1 or tag2 or both.</div> </li> <li class="level1"><div class="li"> <code>{{topic>ns1?tag1 tag2}}</code> – List all pages inside namespace ns1 tagged with either tag1 or tag2 </div> </li> <li class="level1"><div class="li"> <code>{{topic>.?tag1 tag2}}</code> – List all pages inside the current namespace tagged with either tag1 or tag2 </div> </li> <li class="level1"><div class="li"> <code>{{topic>tag1 tag2 tag3&nodate&desc&sort}}</code> (Adding <a href="/plugin:pagelist" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">pagelist</a> options to change the design)</div> </li> </ul> </div> <div class="secedit editbutton_section editbutton_6"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Topic] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="topic" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="1775-3188" /><button type="submit" title="Topic">Edit</button></div></form></div> <h3 class="sectionedit8" id="searchtags">Searchtags</h3> <div class="level3"> <p> Search form for filtering by tag. </p> <pre class="code"> {{searchtags&[flags]}}</pre> <div class="table sectionedit9"><table class="inline"> <tr class="row0"> <th class="col0"> [flags] </th><td class="col1"> pagelist flags delimited by <code>&</code>, see <a href="/plugin:pagelist#flags" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">flags</a> </td><td class="col2"> optional </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_9"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table2" /><input type="hidden" name="range" value="3272-3354" /><button type="submit" title="Table">Edit</button></div></form></div> <p> This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component. </p> <p> This is a great feature which you should not miss. Please add a screenshot of this cool feature. <img src="/lib/images/smileys/fixme.svg" class="icon smiley" alt="FIXME" /> </p> <p> And you might check out <a href="/plugin:tagfilter" class="wikilink1" title="plugin:tagfilter" data-wiki-id="plugin:tagfilter">TagFilter Plugin</a> for similar purpose but in different scenarios. </p> <p> Example: </p> <ul> <li class="level1"><div class="li"> <code>{{searchtags}}</code> – The basic syntax</div> </li> <li class="level1"><div class="li"> <code>{{searchtags&nodate&desc&sort}}</code> – with <a href="/plugin:pagelist" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">pagelist</a> options to change the design</div> </li> <li class="level1"><div class="li"> <code>{{searchtags&nonsform}}</code> – hide the namespace selector</div> </li> </ul> </div> <div class="secedit editbutton_section editbutton_8"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Searchtags] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="searchtags" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="3189-4089" /><button type="submit" title="Searchtags">Edit</button></div></form></div> <h3 class="sectionedit10" id="count">Count</h3> <div class="level3"> <p> Shows a list of tags and its number of occurrences. </p> <pre class="code">{{count>[tag][&namespace]}}</pre> <div class="table sectionedit11"><table class="inline"> <tr class="row0"> <th class="col0 leftalign"> [tags] </th><td class="col1 leftalign"> The tag for which you want to list the occurrence. Multiple tags separated by spaces. </td><td class="col2 leftalign"> optional </td> </tr> <tr class="row1"> <th class="col0 leftalign"> &[namespaces] </th><td class="col1"> Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. </td><td class="col2 leftalign"> optional </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_11"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table3" /><input type="hidden" name="range" value="4190-4454" /><button type="submit" title="Table">Edit</button></div></form></div> <p> This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a <code>+</code> (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces. </p> <p> Example: </p> <ul> <li class="level1"><div class="li"> <code>{{count>+}}</code> – List all tags with related occurrences.</div> </li> <li class="level1"><div class="li"> <code>{{count>tag1 tag2}}</code> – List the occurrence of tag1 and tag2.</div> </li> <li class="level1"><div class="li"> <code>{{count>tag1 tag2 tag3&. ns1 ns2}}</code> – List all occurrences for the given tags inside the namespaces (the dot <code>.</code> specifies the root namespace)</div> </li> <li class="level1"><div class="li"> <code>{{count>+&ns1 ns2}}</code> – List all tags in <code>ns1</code> and <code>ns2</code>.</div> </li> </ul> </div> <div class="secedit editbutton_section editbutton_10"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Count] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="count" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="4090-5139" /><button type="submit" title="Count">Edit</button></div></form></div> <h3 class="sectionedit12" id="tagpage">Tagpage</h3> <div class="level3"> <p> Make link to the tag list </p> <pre class="code"> {{tagpage>[tag][&dynamic][|title]}}</pre> <p> This displays a link to the listing of all tags as it is done by the <a href="#tag" title="plugin:tag ↵" class="wikilink1">Tag</a> syntax but without tagging the page with that tag. With the optional <code>dynamic</code> flag the link becomes red when the listing of all pages with that tag is empty for the current user. The <code>dynamic</code> flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name. </p> <p> Example: </p> <ul> <li class="level1"><div class="li"> <code>{{tagpage>test_foo}}</code> – The basic syntax</div> </li> <li class="level1"><div class="li"> <code>{{tagpage>test_foo&dynamic}}</code> – A link with dynamic link color</div> </li> <li class="level1"><div class="li"> <code>{{tagpage>test_foo|my title}}</code> – A link with custom title</div> </li> <li class="level1"><div class="li"> <code>{{tagpage>test_foo&dynamic|my | title}}</code> – A link with dynamic link color and custom title (that can also contain <code>|</code>)</div> </li> </ul> </div> <div class="secedit editbutton_section editbutton_12"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Tagpage] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="tagpage" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="5140-6030" /><button type="submit" title="Tagpage">Edit</button></div></form></div> <h2 class="sectionedit13" id="configuration">Configuration</h2> <div class="level2"> <p> The plugin can be configured with the DokuWiki configuration manager available in the admin menu. </p> <div class="table sectionedit14"><table class="inline"> <tr class="row0"> <th class="col0"> <code>namespace</code> </th><td class="col1"> Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component <code>{{topic>...}}</code> to display the list of tags on such a page for example. The default value of <code>namespace</code> is: <code>tag</code> </td> </tr> <tr class="row1"> <th class="col0"> <code>sortkey</code> </th><td class="col1"> Order in which tagged pages are sorted in the topic overview; available options are <code>cdate</code> as creation date, <code>mdate</code> as modification date, <code>pagename</code>, <code>id</code> as page ID, <code>ns</code> to sort pages before namespaces and <code>title</code> </td> </tr> <tr class="row2"> <th class="col0"> <code>sortorder</code> </th><td class="col1"> Sort order of the topic overview (ascending or descending) </td> </tr> <tr class="row3"> <th class="col0"> <code>pagelist_flags</code> </th><td class="col1"> Comma separated <a href="/plugin:pagelist#flags" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">Flags</a> of the <a href="/plugin:pagelist" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">pagelist</a> plugin which is used to display the topic overview </td> </tr> <tr class="row4"> <th class="col0"> <code>toolbar_icon</code> </th><td class="col1"> Show icon in page editor toolbar to add tags. </td> </tr> <tr class="row5"> <th class="col0"> <code>list_tags_of_subns</code> </th><td class="col1"> When counting tags in specified namespaces include also tags in subnamespaces. </td> </tr> <tr class="row6"> <th class="col0"> <code>tags_list_css</code> </th><td class="col1"> Choose tags list style between standard or optimised for top of page position. </td> </tr> </table></div> <div class="secedit editbutton_table editbutton_14"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Table] " /><input type="hidden" name="target" value="table" /><input type="hidden" name="hid" value="table4" /><input type="hidden" name="range" value="6157-7202" /><button type="submit" title="Table">Edit</button></div></form></div> </div> <div class="secedit editbutton_section editbutton_13"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Configuration] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="configuration" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="6031-7203" /><button type="submit" title="Configuration">Edit</button></div></form></div> <h2 class="sectionedit15" id="tagindex_rebuild">Tagindex Rebuild</h2> <div class="level2"> <p> If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the <a href="/plugin:searchindex" class="wikilink1" title="plugin:searchindex" data-wiki-id="plugin:searchindex">searchindex</a> plugin or <a href="/cli" class="wikilink1" title="cli" data-wiki-id="cli">bin/indexer.php</a>. </p> </div> <div class="secedit editbutton_section editbutton_15"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Tagindex Rebuild] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="tagindex_rebuild" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="7204-7396" /><button type="submit" title="Tagindex Rebuild">Edit</button></div></form></div> <h2 class="sectionedit16" id="demo_screenshots">Demo / Screenshots</h2> <div class="level2"> <p> Topic listing: <a href="/lib/exe/fetch.php?cache=recache&tok=b061b9&media=https%3A%2F%2Ftrello.com%2F1%2Fcards%2F64398723319f190ba6cb5235%2Fattachments%2F6439875fa2fed84e68e5c06e%2Fdownload%2Ftag_overview.png" class="media" title="https://trello.com/1/cards/64398723319f190ba6cb5235/attachments/6439875fa2fed84e68e5c06e/download/tag_overview.png"><img src="/lib/exe/fetch.php?cache=recache&tok=b061b9&media=https%3A%2F%2Ftrello.com%2F1%2Fcards%2F64398723319f190ba6cb5235%2Fattachments%2F6439875fa2fed84e68e5c06e%2Fdownload%2Ftag_overview.png" class="mediacenter" loading="lazy" title="Tag overview" alt="Tag overview" /></a> </p> <p> Tags: <a href="/lib/exe/fetch.php?cache=recache&tok=5b2615&media=https%3A%2F%2Ftrello.com%2F1%2Fcards%2F64398723319f190ba6cb5235%2Fattachments%2F64398760e3c8fe34a7786c62%2Fdownload%2Ftag_page.png" class="media" title="https://trello.com/1/cards/64398723319f190ba6cb5235/attachments/64398760e3c8fe34a7786c62/download/tag_page.png"><img src="/lib/exe/fetch.php?cache=recache&tok=5b2615&media=https%3A%2F%2Ftrello.com%2F1%2Fcards%2F64398723319f190ba6cb5235%2Fattachments%2F64398760e3c8fe34a7786c62%2Fdownload%2Ftag_page.png" class="mediacenter" loading="lazy" title="A page with tags" alt="A page with tags" /></a> </p> </div> <div class="secedit editbutton_section editbutton_16"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Demo / Screenshots] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="demo_screenshots" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="7397-7734" /><button type="submit" title="Demo / Screenshots">Edit</button></div></form></div> <h2 class="sectionedit17" id="changes">Changes</h2> <div class="level2"> <ul> <li class="level1 node"><div class="li"> <strong>2014-02-16</strong></div> <ul> <li class="level2"><div class="li"> New and updated translations</div> </li> <li class="level2"><div class="li"> Fixed tag searching with out of date indexes and numbers</div> </li> <li class="level2"><div class="li"> Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features</div> </li> </ul> </li> <li class="level1 node"><div class="li"> <strong>2013-04-14</strong></div> <ul> <li class="level2"><div class="li"> New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name</div> </li> <li class="level2"><div class="li"> Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title</div> </li> <li class="level2"><div class="li"> In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.</div> </li> <li class="level2"><div class="li"> The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”</div> </li> <li class="level2"><div class="li"> Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).</div> </li> </ul> </li> <li class="level1 node"><div class="li"> <strong>2013-04-05</strong>:</div> <ul> <li class="level2"><div class="li"> New <a href="#tagpage" title="plugin:tag ↵" class="wikilink1">tagpage</a> feature for creating a link to the list of all pages with a certain tag without tagging the page</div> </li> <li class="level2"><div class="li"> Removed the Technorati ping feature as Technorati is no longer using any pings</div> </li> <li class="level2"><div class="li"> zh-tw translation updated</div> </li> </ul> </li> <li class="level1 node"><div class="li"> <strong>2013-02-15</strong>:</div> <ul> <li class="level2"><div class="li"> <img src="/lib/images/smileys/exclaim.svg" class="icon smiley" alt=":!:" /> fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade <abbr title="As soon as possible">ASAP</abbr>!</div> </li> </ul> </li> <li class="level1 node"><div class="li"> <strong>2012-11-25</strong></div> <ul> <li class="level2"><div class="li"> New <a href="#searchtags" title="plugin:tag ↵" class="wikilink1">searchtags</a> feature, displays a search form for the topic syntax</div> </li> <li class="level2"><div class="li"> Fix section edit button styles for the new <a href="/template:dokuwiki" class="wikilink1" title="template:dokuwiki" data-wiki-id="template:dokuwiki">dokuwiki</a> template</div> </li> <li class="level2"><div class="li"> In the topic syntax now really only namespaces and not pages are matched by namespace parameter</div> </li> <li class="level2"><div class="li"> When sorting by the title the case is ignored now</div> </li> <li class="level2"><div class="li"> The <a href="#topic" title="plugin:tag ↵" class="wikilink1">topic</a> syntax of the tag plugin is now used instead of the topic syntax of the <a href="/plugin:blogtng" class="wikilink1" title="plugin:blogtng" data-wiki-id="plugin:blogtng">blogtng</a> plugin when both are installed</div> </li> <li class="level2"><div class="li"> Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed</div> </li> </ul> </li> <li class="level1 node"><div class="li"> <strong>2012-08-24</strong></div> <ul> <li class="level2"><div class="li"> The tag plugin is now using the <a href="/devel:metadata#metadata_index" class="wikilink1" title="devel:metadata" data-wiki-id="devel:metadata">metadata index</a> of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.</div> </li> <li class="level2"><div class="li"> Tags are now normalized in the same way as page ids are normalized</div> </li> </ul> </li> </ul> <p> Development changelog: </p> <ul class="rss"><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/50251e3cb1bc7e27cf1724e7a424b8bab2287cb1" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/50251e3cb1bc7e27cf1724e7a424b8bab2287cb1">Merge pull request #257 from dokuwiki-translate/lang_update_749_17017…</a> (2023-12-05 21:53)</div></li><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/77db8b0e1786ad05f65a4fe1c7544a9052669175" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/77db8b0e1786ad05f65a4fe1c7544a9052669175">translation update</a> (2023-12-05 15:20)</div></li><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/e94ab63550b9d00f504191ddfc6bbd70302aa56a" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/e94ab63550b9d00f504191ddfc6bbd70302aa56a">update plugin.info.txt</a> (2023-10-17 22:40)</div></li><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/c03578edd33d1ac54f09620dbc198b448fad2059" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/c03578edd33d1ac54f09620dbc198b448fad2059">Make selector less specific by using .dokuwiki</a> (2023-10-17 22:39)</div></li><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/d83c1e5a40fc3d0e4bd1941c087a92a49ed36041" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/d83c1e5a40fc3d0e4bd1941c087a92a49ed36041">Version upped</a> (2023-09-11 23:50)</div></li><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/d0c9ec35a49a9d5bfc208bfe729eb0b74d3a371c" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/d0c9ec35a49a9d5bfc208bfe729eb0b74d3a371c">Merge pull request #254 from Miro-Collas/master</a> (2023-09-11 17:31)</div></li><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/ddc58010b38d532796270dfebf5d75d6f47520ff" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/ddc58010b38d532796270dfebf5d75d6f47520ff">Another minor fix</a> (2023-09-11 01:10)</div></li><li><div class="li"><a href="https://github.com/dokufreaks/plugin-tag/commit/25bac825336c08588d8bc529a3773955b1dc9e5a" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/commit/25bac825336c08588d8bc529a3773955b1dc9e5a">Miro bugfix</a> (2023-09-11 01:04)</div></li></ul> </div> <div class="secedit editbutton_section editbutton_17"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Changes] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="changes" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="7735-10405" /><button type="submit" title="Changes">Edit</button></div></form></div> <h2 class="sectionedit18" id="sites_using_this_plugin">Sites using this Plugin</h2> <div class="level2"> <p> Feel free to add yours here: </p> <ul> <li class="level1"><div class="li"> <a href="http://tokeek.de" class="urlextern" title="http://tokeek.de">http://tokeek.de</a> (German)</div> </li> <li class="level1"><div class="li"> <a href="http://pe.hillschmidt.de" class="urlextern" title="http://pe.hillschmidt.de">Prinz Eisenherz Lexikon</a> (German)</div> </li> <li class="level1"><div class="li"> <a href="http://wiki.psiconauti.net" class="urlextern" title="http://wiki.psiconauti.net">Psiconauti</a> (Italian)</div> </li> <li class="level1"><div class="li"> <a href="https://radeff.red/blog/cloud" class="urlextern" title="https://radeff.red/blog/cloud">Blog Fred Radeff</a> (French)</div> </li> </ul> </div> <div class="secedit editbutton_section editbutton_18"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Sites using this Plugin] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="sites_using_this_plugin" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="10406-10694" /><button type="submit" title="Sites using this Plugin">Edit</button></div></form></div> <h2 class="sectionedit19" id="faq">FAQ</h2> <div class="level2"> </div> <div class="secedit editbutton_section editbutton_19"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[FAQ] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="faq" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="10695-10711" /><button type="submit" title="FAQ">Edit</button></div></form></div> <h3 class="sectionedit20" id="how_to_use_tags_which_consist_of_multiple_words">How to use tags which consist of multiple words?</h3> <div class="level3"> <p> Just use an “_”, it gets automatically replaced by a “ ” i.e.: </p> <pre class="code">{{tag>tag_with_multiple_words}}</pre> <p> Also, quotes seem to work: </p> <pre class="code">{{tag>"tag with multiple words"}}</pre> </div> <div class="secedit editbutton_section editbutton_20"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[How to use tags which consist of multiple words?] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="how_to_use_tags_which_consist_of_multiple_words" /><input type="hidden" name="codeblockOffset" value="0" /><input type="hidden" name="range" value="10712-10959" /><button type="submit" title="How to use tags which consist of multiple words?">Edit</button></div></form></div> <h3 class="sectionedit21" id="how_to_make_the_tag_namespace_breadcrumb_still_work">How to make the tag namespace breadcrumb still work</h3> <div class="level3"> <p> Let's use one of the example websites. </p> <p> If you go to <a href="https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze" class="urlextern" title="https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze">https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze</a> and then click in the breadcrumb “esperienze” you go to <a href="https://wiki.psiconauti.net/tag/esperienze" class="urlextern" title="https://wiki.psiconauti.net/tag/esperienze">https://wiki.psiconauti.net/tag/esperienze</a> , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess </p> <p> This also allows you to keep your start page to add there, for example, the list of tags If your <a href="/config:startpage" class="wikilink1" title="config:startpage" data-wiki-id="config:startpage">start page</a> is not “start”, change it to the one you use </p> <pre class="code">RewriteCond %{REQUEST_URI} !tag:start RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag:$1?do=showtag&tag=$1</pre> </div> <div class="secedit editbutton_section editbutton_21"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[How to make the tag namespace breadcrumb still work] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="how_to_make_the_tag_namespace_breadcrumb_still_work" /><input type="hidden" name="codeblockOffset" value="2" /><input type="hidden" name="range" value="10960-11681" /><button type="submit" title="How to make the tag namespace breadcrumb still work">Edit</button></div></form></div> <h3 class="sectionedit22" id="change_css_styles_depending_on_existing_tags">Change CSS styles depending on existing tags</h3> <div class="level3"> <p> This colors the background of the page to red if the keyword 'deprecated' is specified as a tag. </p> <dl class="code"> <dt><a href="/_export/code/plugin:tag?codeblock=3" title="Download Snippet" class="mediafile mf_php">action.php</a></dt> <dd><pre class="code php"><span class="kw2">function</span> _handle_keywords<span class="br0">(</span><span class="sy0">&</span><span class="re0">$data</span><span class="br0">)</span> <span class="br0">{</span> <span class="kw2">global</span> <span class="re0">$ID</span><span class="sy0">;</span> <span class="co1">// Fetch tags for the page; stop proceeding when no tags specified</span> <span class="re0">$tags</span> <span class="sy0">=</span> p_get_metadata<span class="br0">(</span><span class="re0">$ID</span><span class="sy0">,</span> <span class="st_h">'subject'</span><span class="sy0">,</span> METADATA_DONT_RENDER<span class="br0">)</span><span class="sy0">;</span> <span class="kw1">if</span><span class="br0">(</span><a href="http://www.php.net/is_null"><span class="kw3">is_null</span></a><span class="br0">(</span><span class="re0">$tags</span><span class="br0">)</span><span class="br0">)</span> <span class="kw1">return</span><span class="sy0">;</span> <span class="co1">// Replace underscores with blanks</span> <span class="kw1">foreach</span><span class="br0">(</span><span class="re0">$data</span><span class="sy0">-></span><span class="me1">data</span><span class="br0">[</span><span class="st_h">'meta'</span><span class="br0">]</span> <span class="kw1">as</span> <span class="sy0">&</span><span class="re0">$meta</span><span class="br0">)</span> <span class="br0">{</span> <span class="kw1">if</span><span class="br0">(</span><span class="re0">$meta</span><span class="br0">[</span><span class="st_h">'name'</span><span class="br0">]</span> <span class="sy0">==</span> <span class="st_h">'keywords'</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$meta</span><span class="br0">[</span><span class="st_h">'content'</span><span class="br0">]</span> <span class="sy0">=</span> <a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">(</span><span class="st_h">'_'</span><span class="sy0">,</span> <span class="st_h">' '</span><span class="sy0">,</span> <span class="re0">$meta</span><span class="br0">[</span><span class="st_h">'content'</span><span class="br0">]</span><span class="br0">)</span><span class="sy0">;</span> <span class="co1">// add extra styling</span> <span class="re0">$t</span> <span class="sy0">=</span> <a href="http://www.php.net/explode"><span class="kw3">explode</span></a><span class="br0">(</span><span class="st_h">','</span><span class="sy0">,</span> <span class="re0">$meta</span><span class="br0">[</span><span class="st_h">'content'</span><span class="br0">]</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">if</span><span class="br0">(</span><a href="http://www.php.net/in_array"><span class="kw3">in_array</span></a><span class="br0">(</span><span class="st_h">'deprecated'</span><span class="sy0">,</span> <span class="re0">$t</span><span class="br0">)</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$data</span><span class="sy0">-></span><span class="me1">data</span><span class="br0">[</span><span class="st_h">'style'</span><span class="br0">]</span><span class="br0">[</span><span class="br0">]</span> <span class="sy0">=</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">(</span><span class="st_h">'type'</span> <span class="sy0">=></span> <span class="st_h">'text/css'</span><span class="sy0">,</span> <span class="st_h">'_data'</span> <span class="sy0">=></span> <span class="st_h">'.dokuwiki .page {background-color: red;}'</span><span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span> <span class="br0">}</span> <span class="br0">}</span> <span class="br0">}</span></pre> </dd></dl> </div> <div class="secedit editbutton_section editbutton_22"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Change CSS styles depending on existing tags] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="change_css_styles_depending_on_existing_tags" /><input type="hidden" name="codeblockOffset" value="3" /><input type="hidden" name="range" value="11682-12714" /><button type="submit" title="Change CSS styles depending on existing tags">Edit</button></div></form></div> <h3 class="sectionedit23" id="customizing_the_breadcrumbs">Customizing the breadcrumbs</h3> <div class="level3"> <p> If you add at <code>pagelist/helper.php</code> </p> <pre class="code php"><span class="kw2">function</span> tpl_youarehere2_help<span class="br0">(</span><span class="re0">$id</span><span class="br0">)</span><span class="br0">{</span> <span class="re0">$result</span> <span class="sy0">=</span> <span class="st_h">''</span><span class="sy0">;</span> <span class="kw2">global</span> <span class="re0">$conf</span><span class="sy0">;</span> <span class="kw2">global</span> <span class="re0">$ID</span><span class="sy0">;</span> <span class="kw2">global</span> <span class="re0">$lang</span><span class="sy0">;</span> <span class="co1">// check if enabled</span> <span class="kw1">if</span><span class="br0">(</span><span class="sy0">!</span><span class="re0">$conf</span><span class="br0">[</span><span class="st_h">'youarehere'</span><span class="br0">]</span><span class="br0">)</span> <span class="kw1">return</span> <span class="kw4">false</span><span class="sy0">;</span> <span class="re0">$parts</span> <span class="sy0">=</span> <a href="http://www.php.net/explode"><span class="kw3">explode</span></a><span class="br0">(</span><span class="st_h">':'</span><span class="sy0">,</span> <span class="re0">$id</span><span class="br0">)</span><span class="sy0">;</span> <span class="re0">$count</span> <span class="sy0">=</span> <a href="http://www.php.net/count"><span class="kw3">count</span></a><span class="br0">(</span><span class="re0">$parts</span><span class="br0">)</span><span class="sy0">;</span> <span class="co1">// always print the startpage</span> <span class="re0">$result</span> <span class="sy0">.=</span> html_wikilink<span class="br0">(</span><span class="st_h">':'</span><span class="sy0">.</span><span class="re0">$conf</span><span class="br0">[</span><span class="st_h">'start'</span><span class="br0">]</span><span class="br0">)</span><span class="sy0">;</span> <span class="co1">// print intermediate namespace links</span> <span class="re0">$part</span> <span class="sy0">=</span> <span class="st_h">''</span><span class="sy0">;</span> <span class="kw1">for</span><span class="br0">(</span><span class="re0">$i</span><span class="sy0">=</span><span class="nu0">0</span><span class="sy0">;</span> <span class="re0">$i</span><span class="sy0"><</span><span class="re0">$count</span> <span class="sy0">-</span> <span class="nu0">1</span><span class="sy0">;</span> <span class="re0">$i</span><span class="sy0">++</span><span class="br0">)</span><span class="br0">{</span> <span class="re0">$part</span> <span class="sy0">.=</span> <span class="re0">$parts</span><span class="br0">[</span><span class="re0">$i</span><span class="br0">]</span><span class="sy0">.</span><span class="st_h">':'</span><span class="sy0">;</span> <span class="re0">$page</span> <span class="sy0">=</span> <span class="re0">$part</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$page</span> <span class="sy0">==</span> <span class="re0">$conf</span><span class="br0">[</span><span class="st_h">'start'</span><span class="br0">]</span><span class="br0">)</span> <span class="kw1">continue</span><span class="sy0">;</span> <span class="co1">// Skip startpage</span> <span class="co1">// output</span> <span class="re0">$result</span> <span class="sy0">.=</span> <span class="st_h">' &raquo '</span><span class="sy0">.</span>html_wikilink<span class="br0">(</span><span class="re0">$page</span><span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span> <span class="co1">// print current page, skipping start page, skipping for namespace index</span> resolve_pageid<span class="br0">(</span><span class="st_h">''</span><span class="sy0">,</span><span class="re0">$page</span><span class="sy0">,</span><span class="re0">$exists</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">if</span><span class="br0">(</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">(</span><span class="re0">$page</span><span class="br0">)</span> <span class="sy0">&&</span> <span class="re0">$page</span><span class="sy0">==</span><span class="re0">$part</span><span class="sy0">.</span><span class="re0">$parts</span><span class="br0">[</span><span class="re0">$i</span><span class="br0">]</span><span class="br0">)</span> <span class="kw1">return</span> <span class="re0">$result</span><span class="sy0">;</span> <span class="re0">$page</span> <span class="sy0">=</span> <span class="re0">$part</span><span class="sy0">.</span><span class="re0">$parts</span><span class="br0">[</span><span class="re0">$i</span><span class="br0">]</span><span class="sy0">;</span> <span class="kw1">if</span><span class="br0">(</span><span class="re0">$page</span> <span class="sy0">==</span> <span class="re0">$conf</span><span class="br0">[</span><span class="st_h">'start'</span><span class="br0">]</span><span class="br0">)</span> <span class="kw1">return</span> <span class="re0">$result</span><span class="sy0">;</span> <span class="re0">$result</span> <span class="sy0">.=</span> <span class="st_h">' &raquo '</span><span class="sy0">.</span>html_wikilink<span class="br0">(</span><span class="re0">$page</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">return</span> <span class="re0">$result</span><span class="sy0">;</span> <span class="br0">}</span> <span class="kw2">function</span> tpl_youarehere2<span class="br0">(</span><span class="re0">$id</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$str</span> <span class="sy0">=</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">tpl_youarehere2_help</span><span class="br0">(</span><span class="re0">$id</span><span class="br0">)</span><span class="sy0">;</span> <span class="re0">$pos</span> <span class="sy0">=</span> <a href="http://www.php.net/strrpos"><span class="kw3">strrpos</span></a><span class="br0">(</span><span class="re0">$str</span> <span class="sy0">,</span> <span class="st_h">'&raquo'</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$pos</span> <span class="sy0">==</span> <span class="sy0">-</span><span class="nu0">1</span><span class="br0">)</span> <span class="kw1">return</span> <span class="re0">$str</span><span class="sy0">;</span> <span class="kw1">return</span> <a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">(</span><span class="re0">$str</span><span class="sy0">,</span> <span class="nu0">0</span><span class="sy0">,</span> <span class="re0">$pos</span><span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span> <span class="kw2">function</span> addPage2<span class="br0">(</span><span class="re0">$page</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$id</span> <span class="sy0">=</span> <span class="re0">$page</span><span class="br0">[</span><span class="st_h">'id'</span><span class="br0">]</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="sy0">!</span><span class="re0">$id</span><span class="br0">)</span> <span class="kw1">return</span> <span class="kw4">false</span><span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span> <span class="sy0">=</span> <span class="re0">$page</span><span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span>_meta <span class="sy0">=</span> <span class="kw4">NULL</span><span class="sy0">;</span> <span class="co1">// priority and draft</span> <span class="kw1">if</span> <span class="br0">(</span><span class="sy0">!</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span><span class="br0">[</span><span class="st_h">'draft'</span><span class="br0">]</span><span class="br0">)</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span><span class="br0">[</span><span class="st_h">'draft'</span><span class="br0">]</span> <span class="sy0">=</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span>_getMeta<span class="br0">(</span><span class="st_h">'type'</span><span class="br0">)</span> <span class="sy0">==</span> <span class="st_h">'draft'</span><span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span> <span class="re0">$class</span> <span class="sy0">=</span> <span class="st_h">''</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span><span class="br0">[</span><span class="st_h">'priority'</span><span class="br0">]</span><span class="br0">)</span><span class="br0">)</span> <span class="re0">$class</span> <span class="sy0">.=</span> <span class="st_h">'priority'</span><span class="sy0">.</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span><span class="br0">[</span><span class="st_h">'priority'</span><span class="br0">]</span><span class="sy0">.</span> <span class="st_h">' '</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span><span class="br0">[</span><span class="st_h">'draft'</span><span class="br0">]</span><span class="br0">)</span> <span class="re0">$class</span> <span class="sy0">.=</span> <span class="st_h">'draft '</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span><span class="br0">[</span><span class="st_h">'class'</span><span class="br0">]</span><span class="br0">)</span> <span class="re0">$class</span> <span class="sy0">.=</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">page</span><span class="br0">[</span><span class="st_h">'class'</span><span class="br0">]</span><span class="sy0">;</span> <span class="kw1">if</span><span class="br0">(</span><span class="sy0">!</span><a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">(</span><span class="re0">$class</span><span class="br0">)</span><span class="br0">)</span> <span class="re0">$class</span> <span class="sy0">=</span> <span class="st_h">' class="'</span> <span class="sy0">.</span> <span class="re0">$class</span> <span class="sy0">.</span> <span class="st_h">'"'</span><span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">doc</span> <span class="sy0">.=</span> DOKU_TAB<span class="sy0">.</span><span class="st_h">'<tr'</span><span class="sy0">.</span><span class="re0">$class</span><span class="sy0">.</span><span class="st_h">'>'</span><span class="sy0">.</span>DOKU_LF<span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span>_pageCell<span class="br0">(</span><span class="re0">$id</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">column</span><span class="br0">[</span><span class="st_h">'date'</span><span class="br0">]</span><span class="br0">)</span> <span class="re0">$this</span><span class="sy0">-></span>_dateCell<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">column</span><span class="br0">[</span><span class="st_h">'user'</span><span class="br0">]</span><span class="br0">)</span> <span class="re0">$this</span><span class="sy0">-></span>_userCell<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">column</span><span class="br0">[</span><span class="st_h">'desc'</span><span class="br0">]</span><span class="br0">)</span> <span class="re0">$this</span><span class="sy0">-></span>_descCell<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">foreach</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">plugins</span> <span class="kw1">as</span> <span class="re0">$plug</span> <span class="sy0">=></span> <span class="re0">$col</span><span class="br0">)</span> <span class="br0">{</span> <span class="kw1">if</span> <span class="br0">(</span><span class="re0">$this</span><span class="sy0">-></span><span class="me1">column</span><span class="br0">[</span><span class="re0">$col</span><span class="br0">]</span><span class="br0">)</span> <span class="re0">$this</span><span class="sy0">-></span>_pluginCell<span class="br0">(</span><span class="re0">$plug</span><span class="sy0">,</span> <span class="re0">$col</span><span class="sy0">,</span> <span class="re0">$id</span><span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">doc</span> <span class="sy0">.=</span> DOKU_TAB<span class="sy0">.</span><span class="st_h">'</tr>'</span><span class="sy0">.</span>DOKU_LF<span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">doc</span> <span class="sy0">.=</span> DOKU_TAB<span class="sy0">.</span><span class="st_h">'<tr'</span><span class="sy0">.</span><span class="re0">$class</span><span class="sy0">.</span><span class="st_h">'>'</span><span class="sy0">.</span>DOKU_LF<span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">doc</span> <span class="sy0">.=</span> DOKU_TAB<span class="sy0">.</span>DOKU_TAB<span class="sy0">.</span><span class="st_h">'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">'</span><span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">doc</span> <span class="sy0">.=</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">tpl_youarehere2</span><span class="br0">(</span><span class="re0">$id</span><span class="br0">)</span><span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">doc</span> <span class="sy0">.=</span><span class="st_h">'</td>'</span><span class="sy0">.</span>DOKU_LF<span class="sy0">;</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">doc</span> <span class="sy0">.=</span> DOKU_TAB<span class="sy0">.</span><span class="st_h">'</tr>'</span><span class="sy0">.</span>DOKU_LF<span class="sy0">;</span> <span class="kw1">return</span> <span class="kw4">true</span><span class="sy0">;</span> <span class="br0">}</span></pre> <p> And change <code>tag/action.php</code> </p> <pre class="code php"><span class="re0">$pagelist</span><span class="sy0">-></span><span class="me1">setFlags</span><span class="br0">(</span><span class="re0">$flags</span><span class="br0">)</span><span class="sy0">;</span> <span class="re0">$pagelist</span><span class="sy0">-></span><span class="me1">startList</span><span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">foreach</span> <span class="br0">(</span><span class="re0">$pages</span> <span class="kw1">as</span> <span class="re0">$page</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$pagelist</span><span class="sy0">-></span><span class="me1">addPage</span><span class="br0">(</span><span class="re0">$page</span><span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span></pre> <p> to </p> <pre class="code php"><span class="re0">$pagelist</span><span class="sy0">-></span><span class="me1">setFlags</span><span class="br0">(</span><span class="re0">$flags</span><span class="br0">)</span><span class="sy0">;</span> <span class="re0">$pagelist</span><span class="sy0">-></span><span class="me1">startList</span><span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span> <span class="kw1">foreach</span> <span class="br0">(</span><span class="re0">$pages</span> <span class="kw1">as</span> <span class="re0">$page</span><span class="br0">)</span> <span class="br0">{</span> <span class="re0">$pagelist</span><span class="sy0">-></span><span class="me1">addPage2</span><span class="br0">(</span><span class="re0">$page</span><span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span></pre> <p> After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages. </p> </div> <div class="secedit editbutton_section editbutton_23"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Customizing the breadcrumbs] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="customizing_the_breadcrumbs" /><input type="hidden" name="codeblockOffset" value="4" /><input type="hidden" name="range" value="12715-15699" /><button type="submit" title="Customizing the breadcrumbs">Edit</button></div></form></div> <h3 class="sectionedit24" id="bad_appearance_when_displaying_tags_at_top_of_page">Bad appearance when displaying tags at top of page</h3> <div class="level3"> <p> <img src="/lib/images/smileys/exclaim.svg" class="icon smiley" alt=":!:" /> Integrated to main code (see <code>tags_list_css</code>) option </p> <p> When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the <abbr title="Table of Contents">TOC</abbr> (Table of Contents). To make the visual appearance more smooth, change your <code>lib/plugins/tag/style.css</code> to the following code: </p> <pre class="code css">div<span class="re1">.dokuwiki</span> div<span class="re1">.tags</span> <span class="br0">{</span> <span class="kw1">border-top</span><span class="sy0">:</span> <span class="re3">2px</span> <span class="kw2">dotted</span> __border__<span class="sy0">;</span> <span class="kw1">font-size</span><span class="sy0">:</span> <span class="re3">95%</span><span class="sy0">;</span> <span class="kw1">text-align</span><span class="sy0">:</span> <span class="kw2">right</span><span class="sy0">;</span> <span class="coMULTI">/* clear: both; */</span> <span class="br0">}</span></pre> </div> <div class="secedit editbutton_section editbutton_24"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Bad appearance when displaying tags at top of page] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="bad_appearance_when_displaying_tags_at_top_of_page" /><input type="hidden" name="codeblockOffset" value="7" /><input type="hidden" name="range" value="15700-16204" /><button type="submit" title="Bad appearance when displaying tags at top of page">Edit</button></div></form></div> <h3 class="sectionedit25" id="how_to_change_the_word_tag_and_topic_to_another_language">How to change the word tag and topic to another language</h3> <div class="level3"> <blockquote><div class="no"> Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –<a href="https://forum.dokuwiki.org/u/damascene" class="interwiki iw_user" title="https://forum.dokuwiki.org/u/damascene">damascene</a> <em>2012/04/10</em></div></blockquote> <p> You need to add copy of the existing tag pattern, and modify it to </p> <dl class="code"> <dt><a href="/_export/code/plugin:tag?codeblock=8" title="Download Snippet" class="mediafile mf_php">syntax/tag.php</a></dt> <dd><pre class="code php"> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">Lexer</span><span class="sy0">-></span><span class="me1">addSpecialPattern</span><span class="br0">(</span><span class="st_h">'\{\{tag>.*?\}\}'</span><span class="sy0">,</span> <span class="re0">$mode</span><span class="sy0">,</span> <span class="st_h">'plugin_tag_tag'</span><span class="br0">)</span><span class="sy0">;</span> <span class="co1">//e.g. Spanish:</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">Lexer</span><span class="sy0">-></span><span class="me1">addSpecialPattern</span><span class="br0">(</span><span class="st_h">'\{\{etiqueta>.*?\}\}'</span><span class="sy0">,</span> <span class="re0">$mode</span><span class="sy0">,</span> <span class="st_h">'plugin_tag_tag'</span><span class="br0">)</span><span class="sy0">;</span></pre> </dd></dl> </div> <div class="secedit editbutton_section editbutton_25"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[How to change the word tag and topic to another language] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="how_to_change_the_word_tag_and_topic_to_another_language" /><input type="hidden" name="codeblockOffset" value="8" /><input type="hidden" name="range" value="16205-16740" /><button type="submit" title="How to change the word tag and topic to another language">Edit</button></div></form></div> <h2 class="sectionedit26" id="discussion">Discussion</h2> <div class="level2"> </div> <div class="secedit editbutton_section editbutton_26"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Discussion] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="discussion" /><input type="hidden" name="codeblockOffset" value="9" /><input type="hidden" name="range" value="16741-16764" /><button type="submit" title="Discussion">Edit</button></div></form></div> <h3 class="sectionedit27" id="pagelist_with_alphabetical_headers">Pagelist With Alphabetical Headers</h3> <div class="level3"> <p> Is there a way to group pages by the first letter of their name or header? </p> <p> Something like the example in this post on the user forums? <a href="https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list" class="urlextern" title="https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list">https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list</a> </p> <blockquote><div class="no"> No.</div></blockquote> </div> <div class="secedit editbutton_section editbutton_27"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Pagelist With Alphabetical Headers] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="pagelist_with_alphabetical_headers" /><input type="hidden" name="codeblockOffset" value="9" /><input type="hidden" name="range" value="16765-17020" /><button type="submit" title="Pagelist With Alphabetical Headers">Edit</button></div></form></div> <h3 class="sectionedit28" id="collapsible_outline_of_all_tags">Collapsible outline of all tags</h3> <div class="level3"> <p> My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).<br/> –davidtango 2021-03-21 </p> <p> — </p> <p> I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx </p> <p> Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy. </p> <p> For <em class="u"><strong>bugs or feature requests, there is the bug tracker</strong></em> linked here : <a href="https://github.com/dokufreaks/plugin-tag/issues" class="urlextern" title="https://github.com/dokufreaks/plugin-tag/issues">Bug tracker</a>. </p> <p> This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file. </p> <p> If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)? </p> <blockquote><div class="no"> Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.</div></blockquote> <ul> <li class="level1 node"><div class="li"> Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)</div> <ul> <li class="level2 node"><div class="li"> Sry, me stupid, it works with count… <strong>BUG</strong> except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ <a href="http://imgur.com/73Yuj" class="urlextern" title="http://imgur.com/73Yuj">Screenshot</a>. Sry for not registering at github for this.</div> <ul> <li class="level3"><div class="li"> In most of my installation it works, in some not… clueless!</div> </li> </ul> </li> <li class="level2"><div class="li"> How to sort the taglist (count>+) alphabetical?</div> </li> </ul> </li> </ul> <p> <a href="http://openwiki.kr" class="urlextern" title="http://openwiki.kr">My wiki</a> has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — <a href="https://forum.dokuwiki.org/u/goldseed" class="interwiki iw_user" title="https://forum.dokuwiki.org/u/goldseed">S.C. Yoo</a> <em>2014/04/19 06:02</em> </p> <p> Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks </p> <p> Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – <em>2014-09-02</em> </p> </div> <h5 id="blank_pages">Blank pages</h5> <div class="level5"> <p> I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :( </p> <p> All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :( </p> <blockquote><div class="no"> I am using Debian Wheezy and I am having the same issue. </div></blockquote> <p> »»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — <a href="https://forum.dokuwiki.org/u/adrianvesa" class="interwiki iw_user" title="https://forum.dokuwiki.org/u/adrianvesa">A.V</a> </p> </div> <h5 id="nothing_was_found">Nothing was found.</h5> <div class="level5"> <p> Same here, get a Nothing was found page. </p> <p> (2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented. </p> </div> <h5 id="seo_meta_keywords">SEO meta keywords</h5> <div class="level5"> <p> Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — <a href="https://forum.dokuwiki.org/u/Fabricio Rocha" class="interwiki iw_user" title="https://forum.dokuwiki.org/u/Fabricio Rocha">Fabricio Rocha</a> <em>2016-06-11 17:00</em> </p> </div> <h5 id="sorting_the_count_results">Sorting the {{count>}} results</h5> <div class="level5"> <p> Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that <a href="/plugin:pagelist" class="wikilink1" title="plugin:pagelist" data-wiki-id="plugin:pagelist">pagelist</a> parameters are not supported. — <a href="https://forum.dokuwiki.org/u/Fabricio Rocha" class="interwiki iw_user" title="https://forum.dokuwiki.org/u/Fabricio Rocha">Fabricio Rocha</a> <em>2016-06-19 19:42</em> </p> <p> This can be achieved by editing the <code>helper.php</code> file of the plugin. Before the <code>return $otag;</code> line within the function <code>tagOccurrences</code>, just insert the line <code>ksort($otags);</code> and that's all. <abbr title="In my opinion">IMO</abbr> this should be standard behavior. — Taylan </p> </div> <h5 id="unorderd_list_of_all_tags">Unorderd List of all tags?</h5> <div class="level5"> <p> Is there a way to gen an unorderd list of all tags, similar as +, but without table and occurrences? </p> </div> <h5 id="filtering_the_list_of_tags">Filtering the list of Tags?</h5> <div class="level5"> <p> Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank. </p> </div> <h5 id="add_to_list_all_the_tags_under_a_tag_namespace">Add "*" to list all the tags under a tag namespace?</h5> <div class="level5"> <p> I need a function to add all the tags under a tag namespace to the tag list.<br/> That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use </p> <pre class="code">{{topic> ns1:*}}</pre> <p> to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.<br/> Now the tag namespace cannot be managed, I hope the basic function can be added.<br/> 2021-6-28 </p> </div> <div class="secedit editbutton_section editbutton_28"><form class="button btn_secedit" method="post" action="/plugin:tag"><div class="no"><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="1705704213" /><input type="hidden" name="summary" value="[Collapsible outline of all tags] " /><input type="hidden" name="target" value="section" /><input type="hidden" name="hid" value="collapsible_outline_of_all_tags" /><input type="hidden" name="codeblockOffset" value="9" /><input type="hidden" name="range" value="17021-" /><button type="submit" title="Collapsible outline of all tags">Edit</button></div></form></div> <!-- wikipage stop --> </div> <div class="docInfo"><bdi>plugin/tag.txt</bdi> · Last modified: <time datetime="2024-01-19T23:43:33+0100">2024-01-19 23:43</time> by <bdi>Aleksandr</bdi></div> <hr class="a11y" /> </div></main><!-- /content --> <!-- PAGE ACTIONS --> <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading"> <h3 class="a11y" id="dokuwiki__pagetools__heading">Page Tools</h3> <div class="tools"> <ul> <li class="edit"><a href="/plugin:tag?do=edit" title="Edit this page [e]" rel="nofollow" accesskey="e"><span>Edit this page</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg></a></li><li class="revs"><a href="/plugin:tag?do=revisions" title="Old revisions [o]" rel="nofollow" accesskey="o"><span>Old revisions</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11 7v5.11l4.71 2.79.79-1.28-4-2.37V7m0-5C8.97 2 5.91 3.92 4.27 6.77L2 4.5V11h6.5L5.75 8.25C6.96 5.73 9.5 4 12.5 4a7.5 7.5 0 0 1 7.5 7.5 7.5 7.5 0 0 1-7.5 7.5c-3.27 0-6.03-2.09-7.06-5h-2.1c1.1 4.03 4.77 7 9.16 7 5.24 0 9.5-4.25 9.5-9.5A9.5 9.5 0 0 0 12.5 2z"/></svg></a></li><li class="backlink"><a href="/plugin:tag?do=backlink" title="Backlinks" rel="nofollow"><span>Backlinks</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"/></svg></a></li><li class="top"><a href="#dokuwiki__top" title="Back to top [t]" rel="nofollow" accesskey="t"><span>Back to top</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"/></svg></a></li> </ul> </div> </nav> </div><!-- /wrapper --> <!-- ********** FOOTER ********** --> <footer id="dokuwiki__footer"><div class="pad"> <div class="license">Except where otherwise noted, content on this wiki is licensed under the following license: <bdi><a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en" rel="license" class="urlextern">CC Attribution-Share Alike 4.0 International</a></bdi></div> <div class="buttons"> <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en" rel="license"><img src="/lib/images/license/button/cc-by-sa.png" alt="CC Attribution-Share Alike 4.0 International" /></a> <a href="https://www.dokuwiki.org/donate" title="Donate" ><img src="/lib/tpl/dokuwiki/images/button-donate.gif" width="80" height="15" alt="Donate" /></a> <a href="https://php.net" title="Powered by PHP" ><img src="/lib/tpl/dokuwiki/images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a> <a href="//validator.w3.org/check/referer" title="Valid HTML5" ><img src="/lib/tpl/dokuwiki/images/button-html5.png" width="80" height="15" alt="Valid HTML5" /></a> <a href="//jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" ><img src="/lib/tpl/dokuwiki/images/button-css.png" width="80" height="15" alt="Valid CSS" /></a> <a href="https://dokuwiki.org/" title="Driven by DokuWiki" ><img src="/lib/tpl/dokuwiki/images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a> </div> <div style="margin-top: 2em; font-size:90%" class="dokuwiki"><div style="float:right"><a href="http://www.splitbrain.org/personal#imprint" style="float:right; text-decoration: none; color:#333">Imprint</a></div></div><!-- Include for DokuWiki site wide top bar --> <style type="text/css"> @media screen { body { padding-top: 30px; } #global__header { position: absolute; top: 0; left: 0; text-align: left; vertical-align: middle; line-height: 1.5; background-color: #333; box-shadow: 0 0 8px rgba(0,0,0,0.5); width: 100%; margin: 0; padding: 5px 20px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; white-space: nowrap; overflow: hidden; } #global__header h2 { position: absolute; left: -99999em; top: 0; overflow: hidden; display: inline; } #global__header ul, #global__header li { margin: 0; padding: 0; list-style: none; display: inline; line-height: 1.5; } #global__header a { color: #bbb; text-decoration: none; margin-right: 20px; font-size: 14px; font-weight: normal; } #global__header a:hover, #global__header a:active, #global__header a:focus { color: #fff; text-decoration: underline; } #global__header form { float: right; margin: 0 0 0 20px; } #global__header input { background-color: #333; background-image: none; border: 1px solid #bbb; color: #fff; box-shadow: none; border-radius: 2px; margin: 0; line-height: normal; padding: 1px 0 1px 0; height: auto; } #global__header input.button { border: none; color: #bbb; } #global__header input.button:hover, #global__header input.button:active, #global__header input.button:focus { color: #fff; text-decoration: underline; } } /* /@media */ @media only screen and (min-width: 601px) { /* changes specific for www.dokuwiki.org */ #dokuwiki__header { padding-top: 3em; } #dokuwiki__usertools { top: 3em; } /* changes specific for bugs.dokuwiki.org */ div#container div#showtask { top: 40px; } } /* /@media */ @media only screen and (max-width: 600px) { body { padding-top: 0; } #global__header { position: static; white-space: normal; overflow: auto; } #global__header form { float: none; display: block; margin: 0 0 .4em; } } /* /@media */ @media print { #global__header { display: none; } } /* /@media */ </style> <div id="global__header"> <h2>Global DokuWiki Links</h2> <form method="get" action="https://search.dokuwiki.org/" target="_top"> <input type="text" name="q" title="Search all DokuWiki sites at once" class="input" /> <input type="submit" title="Search all DokuWiki sites at once" value="Search" class="button" /> </form> <ul> <li><a href="https://download.dokuwiki.org" title="Download the latest release" target="_top">Download</a></li> <li><a href="https://www.dokuwiki.org" title="Read the DokuWiki documentation" target="_top">Wiki</a></li> <li><a href="https://forum.dokuwiki.org" title="Ask questions in the DokuWiki forum" target="_top">Forum</a></li> <li><a href="https://irc.dokuwiki.org" title="Check IRC chat logs or join the chat" target="_top">IRC</a></li> <li><a href="https://github.com/splitbrain/dokuwiki/issues" title="Report and track bugs" target="_top">Bugs</a></li> <li><a href="https://translate.dokuwiki.org/" title="Help translating the DokuWiki interface" target="_top">Translate</a></li> <li><a href="https://github.com/splitbrain/dokuwiki" title="Access the most recent git commits" target="_top">Git</a></li> <li><a href="https://xref.dokuwiki.org/reference/dokuwiki/" title="Cross-Reference of the DokuWiki source code" target="_top">XRef</a></li> <li><a href="https://codesearch.dokuwiki.org/" title="Search through the sources of DokuWiki, plugins and templates" target="_top">Code Search</a></li> </ul> </div> <!-- end of DokuWiki top bar include --> </div></footer><!-- /footer --> </div></div><!-- /site --> <div class="no"><img src="/lib/exe/taskrunner.php?id=plugin%3Atag&1733011994" width="2" height="1" alt="" /></div> <div id="screen__mode" class="no"></div></body> </html>