Hey,

I want to display tags of tiddlers in a list. Now I need a solution to 
shorten the tag name.
I tried to build a macro similar to a macro I used before but I don't know 
how to get the "tag-variable".

Maybe someone can help me with this.

So far I have got this code:
/*\
title: $:/macros/tag_shortener.js
type: application/javascript
module-type: macro

Shorten a tag

\*/
(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Information about this macro
*/

exports.name = "tag_shortener";

exports.params = [
{name: "end_string"}
];

/*
Run the macro
*/
exports.run = function(end_string) {
    return this.getVariable("currentTiddler").substring(0, end_string);
};

})();


-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/568906c4-1096-4d10-9b16-07da8efe40a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to