Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Tag Selector Field for blog

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1973 Views
  • Nathan Cox
    Community Member
    99 Posts

    Tag Selector Field for blog Link to this post


    Just thought I'd share something I've been working on: a new form field, TagSetField, for selecting tags when you're posting with the blog module, inspired by the tagging in the del.icio.us plugin for Firefox.

    To make it go you can put TagSetField.php into the project's /code folder and copy the styles from tagsetfield.css into you're theme's stylesheet (they're for BlackCandy).

    In blog/code/BlogHolder.php's BlogEntryForm method replace

    new TextField("Tags","Tags"),


    new TagSetField("Tags","Tags", $this->Children()->toDropDownMap('Tags', 'Tags')),

    to enable it for front-end blog editing.

    It needs refining, but it works.

    Hey, I can't see the attached files...is that not how it works? You can get the files here

  • Tim
    Core Development Team
    201 Posts

    Re: Tag Selector Field for blog Link to this post

    Thanks for your contributions Nathan

  • Ingo
    Forum Moderator
    801 Posts

    Re: Tag Selector Field for blog Link to this post

    great idea! just one suggestion: we prever to have javascript in external files (rather that customScript()). at the moment, this means an additional http-request and slows things down, but it leaves the opportunity to implement a serverside minifying/combining/caching in a future release (something we're currnently discussing to make the CMS load faster)

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.