SmartTag
Created by Jay Gilmore on Mar 28, 2014. Last edited by Novriko Parhusip on Nov 22, 2014.
Description
SmartTag is a tagging system for MODX Revolution and is intended to replace MODX's original auto-tag TV.
By having its own tables, SmartTag can be managed easier compared to the normal auto-tag TV which is stored as comma separated values. SmartTag uses an AJAX combobox for the TV when adding a new tag, and a CMP to list and manage all the tags.
From the CMP you can rename the tag, or delete it entirely from the system, on all resources. You can convert existing auto-tag TVs to be SmartTag TV, or revert SmartTag back to other tag type.
History
SmartTag was first written by goldsky and released on March 28, 2014.
Collaborator: Adam Wintle.
Download
It can be downloaded from within the MODX Revolution manager via Package Management, or from the MODX Extras Repository, here: http://modx.com/extras/package/smarttag
The source code and build script is also available on GitHub: https://github.com/goldsky/SmartTag
Bugs & Feature Requests
Bugs, issues and feature requests can be reported in the GitHub Repository, found here: https://github.com/goldsky/SmartTag/issues
Template Variable
When creating the TV, you need to select the proper input type and output type.


Input Type Options
In input type options, they are exactly as same as auto-tag options, except the queryLimit.
The default value of this queryLimit is 20.
Output Type Options
In output type options, they adapt Delimiter and URL TV output types.
The difference is that in adding link for tags, you need to define the "href" of the link. This is required for link.
The content can be [[~pageId]] or http://www.domain.com
Add a new Tag
You can either add new tag or use existing ones.
If you activate the field, you can type in the tag directly into that "textfield".
If you have not click [ENTER] key in 1 second, the dropdown will come up to offer you any similar tag based on it, or just closed off directly if none is found.
The drop down will force you to select existing one if it lists tags.
If you just want to add new tag, just hit [ENTER] before 1 second.
Custom Manager Page
TagCloud
The CMP is used to make manager easily manages the tags.
If the button is clicked, then a new tab will be opened containing all resources that are using that clicked tag.
On here, you can then delete, rename, or remove the tag from the selected resources.
The Resource's titles are links, so they can be clicked (or ctrl+click or middle-mouse click) to open it.
Converter
In the second page, there's a converter utility to convert existing tag types to SmartTag or revert SmartTag TVs back to the other tag types.
When a SmartTag TV is selected, it also can be synchronized to get all values from related resources to store them into the SmartTag's DB.
Snippet
SmartTag also provides a snippet to list the tags, based on some filters.
smarttagTags
Name | Description | Value Type | Default Value | Since Version |
---|---|---|---|---|
docIds | Comma delimited values of Documents' IDs | String |
|
1.0.0-beta1 |
parentIds | Comma delimited values of Parent Documents' IDs | String |
|
1.0.0-beta5 |
allTags | Show all tags | String |
|
1.0.0-beta5 |
tvNames | Explicitly define which TVs | Comma separated TVs' names |
|
1.0.0-pl |
includeEmptyTags | Do you want to include tags without resources? | Boolean: 0|1 | 0 | 1.0.0-beta1 |
includeHiddenDocs | Do you want to include tags on hidden resources? | Boolean: 0|1 | 0 | 1.0.0-beta5 |
limit |
Maximum number of list. 0 will be ignored. There is "no limit" option, as intended. If you want to list all, just put 1000000 (a million) limit, but you are responsible for any problem to the server.
|
Integer | 10 | 1.0.0-beta1 |
phsPrefix | Prefix for the placeholders | String | smarttag | 1.0.0-beta1 |
sort | Comma delimited multiple sorting. Format: field direction,field direction. Mind the space in between. | String | count desc,tag asc | 1.0.0-beta1 |
tplItem | Name of chunk for item template of the output. @BINDING enabled (eg: @FILE:[path/to/file.tpl]). | String | smarttagtags.item | 1.0.0-beta1 |
tplWrapper | Name of chunk for wrapper template of the output. @BINDING enabled (eg: @FILE:[path/to/file.tpl]). | String | smarttagtags.wrapper | 1.0.0-beta1 |
To list the tags, you MUST either provide docIds, parentIds, or allTags properties (parameters).
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).