Skip to content

How to assign unique IDs to tiddlers? #5304

Answered by saqimtiaz
ichorid asked this question in Q&A
Discussion options

You must be logged in to vote

@ichorid if adding a field in the sync plugin would meet your needs, that is entirely possible. Apologies, you're getting a lot of replies that don't take into account the context of the thread, presumably out of a desire to be helpful despite the busy time of year.

If you post your plugin and point out where in the flow you want to add the field, I can assist you with that.
Otherwise the things to keep in mind are that:

  • Tiddler class objects are immutable.
  • The way to add a field programmatically is to essentially create a new Tiddler with the same title and add it to the wiki store.
  • The usual pattern is as follows below:

this.wiki.addTiddler(new $tw.Tiddler(oldTiddler,newFields));

In …

Replies: 9 comments 19 replies

Comment options

You must be logged in to vote
2 replies
@ichorid
Comment options

@kookma
Comment options

Comment options

You must be logged in to vote
5 replies
@ichorid
Comment options

@Jermolene
Comment options

@ichorid
Comment options

@Jermolene
Comment options

@ichorid
Comment options

Comment options

You must be logged in to vote
2 replies
@ichorid
Comment options

@saqimtiaz
Comment options

Comment options

You must be logged in to vote
1 reply
@ichorid
Comment options

Comment options

You must be logged in to vote
1 reply
@pmario
Comment options

Comment options

You must be logged in to vote
1 reply
@ichorid
Comment options

Comment options

You must be logged in to vote
6 replies
@saqimtiaz
Comment options

@pmario
Comment options

@ichorid
Comment options

@pmario
Comment options

@saqimtiaz
Comment options

Answer selected by ichorid
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ichorid
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants