Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement tags in Symfony 2?

Tags:

symfony

I would like to have a form for entering tags (like the tag symfony2 in this post). Something like the field below would be great, but for starting it would be enough to have a text field with semicolon (;) or comma (,) separated values that go into an n:m relationship in a database.

Unfortunatly it is really hard to search for this, as virtually everything contains the word tag :)

like image 903
mcandril Avatar asked Nov 13 '11 11:11

mcandril


People also ask

What are Symfony tags?

Service tags are a way to tell Symfony or other third-party bundles that your service should be registered in some special way.


1 Answers

There is a bundle that does most of the heavy lifting for you...

http://bundles.knplabs.org/FabienPennequin/FPNTagBundle

You will have to implement the client-side form control (jquery based probably), but could use something like jQuery TagIt

like image 161
JamesHalsall Avatar answered Sep 22 '22 12:09

JamesHalsall