Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Tag Selector Field for blog


Go to End


3 Posts   2332 Views

Avatar
Nathan Cox

Community Member, 99 Posts

1 November 2007 at 1:53pm

Edited: 01/11/2007 1:56pm

Hi,

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"),

with

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

Avatar
Tim

Community Member, 201 Posts

1 November 2007 at 3:19pm

Thanks for your contributions Nathan :-)

Avatar
Ingo

Forum Moderator, 801 Posts

1 November 2007 at 10:13pm

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)