Jump to:

10375 Posts in 2190 Topics by 1707 members

All other Modules

SilverStripe Forums » All other Modules » TagField Module: Improvements

Discuss all other Modules here.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1925 Views
  • Anonymous user
    Avatar
    Community Member
    1 Post

    TagField Module: Improvements Link to this post

    Hello, since I could not immediately see a way to contribute those changes back to the TagField module, I will just put them up here for the time being.

    The file attached below is the TagField module with a number of changes:

    • Javascript split into original tag.js file (+ async patch) and a TagField.js file with the custom scripts.
    • Fixed the custom tags attribute name ('tags' vs. 'taglist') in the javascript loader.
    • Prevented empty tags from being created. Especially important since a non-whitespace separator at end of line, as inserted by the script, created empty tags all the time.
    • Tags which are no longer needed are now removed from the database. This can be turned off.
    • Some minor technical changes.

    I hope a maintainer will read this, and probably include a few of the changes into the module. (It works really great by default, awesome work!)

    Attached Files
  • Ingo
    Avatar
    Forum Moderator
    787 Posts

    Re: TagField Module: Improvements Link to this post

    Hey there,

    thanks very much for your work on the module! I've reflected some of these changes in
    http://open.silverstripe.com/changeset/86151
    http://open.silverstripe.com/changeset/86152

    In general, your work will be much more "noticeable" if you post this stuff to our bugtracker, as documented on http://silverstripe.org/tag-field-module. Also, it is hard to determine the actual code changes if you submit the full module files, please use a patch format instead (see http://doc.silverstripe.com/doku.php?id=submitting-patches). Also, I've added unit tests for the deletion feature you added - have a look through them, we appreciate tests being submitted with patches.

    Thanks again!
    Ingo

  • OnebyOne
    Avatar
    Community Member
    54 Posts

    Re: TagField Module: Improvements Link to this post

    Hi

    I looked at the docs of tag field.

    I have SS2.3.3, data object manager Article Page & Holder code Article Page & Holder SS where i suppose to insert the cod because in the docs isn't specified !

    THX

  • DsX
    Avatar
    Community Member
    172 Posts

    Re: TagField Module: Improvements Link to this post

    How do I set the Separator for tagfield?

  • asecondwill
    Avatar
    Community Member
    49 Posts

    Re: TagField Module: Improvements Link to this post

    like this:

    $tagField = new TagField("Tags", _t("EventEntry.TS", "Tags (comma sep.)"));
    $tagField->setSeparator(",");

    1925 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.