Reserved words or phrases

Are there any reserved words or phrases in naming stuff using TW5?

bobj

Here’s the list of reserved field names which you should avoid using for anything but their canonical purposes.

  • You probably won’t break anything, but repurposing them may have odd and unintended results.

Here’s the list of core macros. Using a preexisting name for a custom macro (or variable) won’t typically cause any major issues: it will just redefine it for the specified scope.

  • So, for example, <<tag>> is normally a short-form macrocall that produces a tag pill corresponding to <<currentTiddler>>, but if you defined a variable named “tag”, it would no longer function as a tag pill within the variable’s scope.
    image
  • You can use this to your advantage if you want to alter the behavior of a core macro on a limited basis: a tiddler containing \define tag() ... your macro content will use this definition instead of the default.

Otherwise, it’s generally good practice not to use the $:/core namespace for your own content, but doing so won’t actually break anything unless you overwrite a preexisting shadow tiddler.

1 Like

You should probably also avoid naming fields as any of the filter operators because this filter syntax is permitted

[[mytiddler]myfield[value]]

i.e this checks if the field myfield in ´mytiddler´ has the value value - so there may be a problem if ´myfield´ had the name of an ordinary filter operator.

BTW, I’d recommend using the field operator with a suffix for this reason.

…other than that, avoid using typical filter characters in your tiddler and field names, .eg thisIsa[very}}}badName

1 Like