Skip to content

Add reference to collection when tag is present #377

Answered by NickyNoName
NickyNoName asked this question in Q&A
Discussion options

You must be logged in to vote

Ah my apologies I misread item.addItemToCollection()! Yes that does work!

Full working code is therefore:

// ========================================================================== //
// EDITABLE SETTINGS
// ========================================================================== //

/**
 * @type {string} Prefix tags set during this script (e.g., "coll-tagName").
 * This makes it easier to search and remove tags later.
 */
const tagPrefix = "#";

/**
 * @type {boolean} If true, trim any leading underscore characters from the
 * collection name.
 */
const trimLeadingUnderscores = true;

/**
 * @type {boolean} If true, trim any leading numbers (i.e., 0-9) from the
 * collection name.
 */

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@NickyNoName
Comment options

@garth74
Comment options

@NickyNoName
Comment options

@NickyNoName
Comment options

Answer selected by NickyNoName
@garth74
Comment options

@NickyNoName
Comment options

@garth74
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants