Tagging

Purpose

Collection of parameters, functions, and classes that expand Ditto’s functionality to include tagging

Summary
TaggingCollection of parameters, functions, and classes that expand Ditto’s functionality to include tagging
Parameters
tagDocumentIDID for tag links to point to
tagDataField to get the tags from
caseSensitiveDetermine whether or not tag matching and duplicate tag removal are case sensitive
tagModeFiltering method to remove tags
tagDelimiterDelimiter that splits each tag in the tagData source
tagDisplayDelimiterWhat separates the tags in [+tagLinks+]
tagSortSort the tags alphanumerically
tagDisplayModeHow to display the tags in [+tagLinks+]
tagsAllow the user to provide initial tags to be filtered
tplTagLinksDefine a custom template for the tagLinks placeholder
tagCallbackAllow the user to modify both where the tags come from and how they are parsed.
Placeholders
tagLinksNice ‘n beautiful tag list with links pointing to tagDocumentID
tagsRaw tags separated by tagDelimiter

Parameters

tagDocumentID

Purpose

ID for tag links to point to

Options

Any MODx document with a Ditto call setup to receive the tags

Default

Current MODx Document

tagData

Purpose

Field to get the tags from

Options

Comma separated list of MODx fields or TVs

Default

[NULL]

caseSensitive

Purpose

Determine whether or not tag matching and duplicate tag removal are case sensitive

Options

0off
1on

Default

0off

tagMode

Purpose

Filtering method to remove tags

Options

onlyAllTagsshow documents that have all of the tags
onlyTagsshow documents that have any of the tags
removeAllTagsremove documents that have all of the tags
removeTagsdocuments that have any of the tags

Default

”onlyTags”

tagDelimiter

Purpose

Delimiter that splits each tag in the tagData source

Options

Any character not included in the tags themselves

Default

” “space

tagDisplayDelimiter

Purpose

What separates the tags in [+tagLinks+]

Options

Any character

Default

&tagDelimiter

tagSort

Purpose

Sort the tags alphanumerically

Options

0off
1on

Default

1on

tagDisplayMode

Purpose

How to display the tags in [+tagLinks+]

Options

1string of links &tagDisplayDelimiter separated
2ul/li list

Note

Output of individual items can be customized by tplTagLinks

Default

1string of links &tagDisplayDelimiter separated

tags

Purpose

Allow the user to provide initial tags to be filtered

Options

Any valid tags separated by tagDelimiter

Default

[NULL]

tplTagLinks

Purpose

Define a custom template for the tagLinks placeholder

Options

  • Any valid chunk name
  • Code via @CODE
  • File via @FILE

Default

<a href="[+url+]" class="ditto_tag" rel="tag">[+tag+]</a>

tagCallback

Purpose

Allow the user to modify both where the tags come from and how they are parsed.

Options

Any valid function name

Default

[NULL]

Notes

The function should expect to receive the following three parameters: tagData - the provided source of the tags resource - the resource array for the document being parsed array - return the results in an array if true

Placeholders

tagLinks

Content

Nice ‘n beautiful tag list with links pointing to tagDocumentID

tags

Content

Raw tags separated by tagDelimiter

ID for tag links to point to
Delimiter that splits each tag in the tagData source
Define a custom template for the tagLinks placeholder