-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update tag.md #287
base: main
Are you sure you want to change the base?
Update tag.md #287
Changes from 1 commit
c5adb4b
8ba9e0c
f5a0345
98fc4ae
5bf64df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,27 +9,31 @@ The **tag** form field type provides a point where you can enter tags - this is | |
- **name** (mandatory) is the unique name of the field. | ||
- **label** (mandatory) (translatable) is the field html label. | ||
- **description** (optional) (translatable) is the [field description](../standard-form-field-attributes.md#description). | ||
- **mode** (optional) (translatable) is either "ajax" or "nested". | ||
- **mode** (optional) (translatable) is either "ajax" or "nested". Defaults to value set in com_tags Options|Data Entry|Tag Entry Mode. | ||
- **id** (optional) is the id to add to the field. Note if none is set this will be the name of the field. | ||
- **class** (optional) is the class to add to the field. | ||
- **published** (optional) determines if non published tags should be allowed. | ||
- **language** (optional) is language to filter the existing tags by. | ||
- **multiple** (optional) is the ability to add more than 1 tag to the form field. | ||
- **custom** (optional) if the ajax mode is chosen setting this to "deny" will prevent users from adding in new tags. | ||
- **remote-seach** (optional) Enables Ajax search - if using mode="nested" you need to set this to "false" or you will only get a partial option list and a broken hierarchy. (*remote-serach="true" (default) only lists a amximum of 30 tags until you search, and orders the list by most used tags first which destroys the heirarchy display. See* [*issue #43803*](https://github.com/joomla/joomla-cms/issues/43803#issuecomment-2234376819)) | ||
|
||
You can see the difference between "ajax" mode and "nested" mode by setting the Global Configuration / Tags / Data Entry and then entering data into the Tags field of an existing article. | ||
|
||
**Ajax mode** | ||
|
||
- The field searches tags (via Ajax) while the user types them in the tag field. | ||
- Three min characters are required to launch the first background AJAX search. | ||
- Three min characters are required to launch the first background AJAX search. This value is set in com_tags Options|Item Selection|Minimum Search Length | ||
- The field also allows custom tag insertion by writing the new tag and pressing the ENTER key (but no longer the COMMA key). | ||
- All the new custom tags inserted in the field are created on the fly in the database. | ||
- The item list is sorted with most-used tags at the top and the path (parent tags if any) is displayed with the tag name. | ||
|
||
**Nested mode** | ||
|
||
- The tag dropdown list displays a hierarchical list of tags (shown in a similar way to how categories are shown) | ||
- You cannot create new tags on the fly | ||
- This list is sorted by heirarchy order (ordering in the com_tags tag list view) rather than alphabetically by path name | ||
- **NB** *Currently (J5.1.2 and earlier) selected tags are removed from the list which breaks the hierarchy display* (*see* [*issue #43705*](https://github.com/joomla/joomla-cms/issues/43803]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not really happy referencing issues in the manual, this would get an maintenance nightmare and could fill the manual with 1000 of referenced issues and pull requests which often is irrelevant and need to be removed if a pr exists or worse keep in the manual if it never get fixed or if it's an expected behavior. It's a different story in the changelog/migration section which automatically gets obsolete with new versions at some point in time. |
||
|
||
Implemented by: libraries/src/Form/Field/TagField.php | ||
|
||
|
@@ -58,5 +62,6 @@ Implemented by: libraries/src/Form/Field/TagField.php | |
mode="nested" | ||
class="inputbox span12 small" | ||
multiple="true" | ||
remote-search="false" | ||
/> | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Correct a typo in the attribute name to ensure proper functionality [Possible issue, importance: 10]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't merge this change, it's only here for demonstrating an issue for codiumai