This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

duplicateslugs Operator

9th May 2020 at 2:17pm
Filter Operators
purposereturns each item in the list in a human-readable form for use in URLs or filenames
inputa selection of titles
outputthe input titles transformed so that they only contain lower case letters, numbers, periods, dashes and underscores

New in: 5.1.23 The slugify can be used to transform arbitrary tiddler titles into human readable strings suitable for use in URLs or filenames. However, itis possible for multiple different titles to slugify to the same string. The duplicateslugs operator can be used to display a warning. For example:

<$list filter="[!is[system]duplicateslugs[]limit[1]]" emptyMessage="There are no duplicate slugs">
The following tiddlers have duplicate slugs:

<ul>
<$list filter="[!is[system]duplicateslugs[]]">
<li><$link><$text text=<<currentTiddler>>/></$link></li>
</$list>
</ul>
</$list>

That renders as:

There are no duplicate slugs