Here is a generic "join" filter:
/*\
title: $:/core/modules/filters/join.js
type: application/javascript
module-type: filteroperator
Filter operator that concatenates all tiddlers from the current list, using the
operator as the seperator
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.join = function(source,operator,options) {
var result = '';
source(function(tiddler,title) {
result+=operator.operand + title;
});
return [ result.substr(operator.operand.length) ];
};
})();
Example for usage:
<$list filter="[[$:]] [[language]] [[Docs]] [[Fields]] [all[current]]
+[join[/]]">
<$view field="title"/>
</$list>
Or shorter:
<$list filter="[[$:/language/Docs/Fields]] [all[current]] +[join[/]]">
<$view field="title"/>
</$list>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.