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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tags to posts with many-to-many relation #44
Comments
馃憤 |
1 similar comment
馃憤 |
I also think it's a good idea to add this many-to-many relation example. @bocharsky-bw thanks for proposing it! |
Or maybe many-to-many Categories instead? And, with it we could show render(controller()) in view to render categories list on sidebar with a posts count ? |
@JulienItard Commonly, the categories more global than tags and better to relate |
So category or tags? |
馃憤 tags |
Tags, because it will be able to add simple example how to use data transformers (Form). |
Yes for tags with entity relates many-to-many |
For tags, probably a lot of code could be reused from http://symfony.com/doc/current/cookbook/form/form_collections.html ? ;) |
It could be interesting to show a nice js experience to the tags with the select2 library |
I'm more inclined to the harvesthq/chosen library for this feature. |
Apparently nobody opened a pull request yet. |
I am going to create a PR for this |
This PR was squashed before being merged into the master branch (closes #447). Discussion ---------- Add tags to Post This implements #44 and it's a complete variant of #192 (On hold since Ago 2016). | Blog Post Index | Post Show | | ---- | --- | | ![tags-index](https://cloud.githubusercontent.com/assets/2028198/22331272/8f0522f8-e398-11e6-8efb-41b8ebb119f4.png) | ![tags-show](https://cloud.githubusercontent.com/assets/2028198/22331381/29aa391a-e399-11e6-9f5a-b09b25a86090.png) | | Post New/Edit | | --- | | ![tagsinput](https://cloud.githubusercontent.com/assets/2028198/22348577/3263128e-e3da-11e6-8b62-25f9720f4275.png) | Also this splits the only one fixture class into three classes (`UserFixtures`, `PostFixtures` and `TagFixtures`): - [x] To prevent mess and complexity. - [x] To avoid post title duplicated (slug issue). - [x] To fix example and explanation of: Sharing objects between fixtures (#192 (comment)). - [x] To add a new example about: Fixture ordering and `DependentFixtureInterface` (dependence between fixtures). Add Translation: - [x] English - [x] Espa帽ol Updated `blog.sqlite` and `blog_test.sqlite` DBs. --- ### Handling Tags (Bootstrap-tagsinput): There is many options to do that: * Form collection to add new tags? * [`select2`](https://select2.github.io/examples.html) or [`chosen`](https://github.com/harvesthq/chosen) js plugins? * [Bootstrap tagsinput](http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/) js plugin? <-- 馃憤 * [Tokenfield for Bootstrap](http://sliptree.github.io/bootstrap-tokenfield/) js plugin? ### TODO: - [x] Create TagsInputType to handle the post tags collection (Added DataTransformer example) - [x] Add typeaheadjs option to show tags hint. Commits ------- 46a54dd Add tags to Post
Should be closed (#447) |
Closed as fixed 馃帀 |
i used a data transformer with select2 and worked smoothly no problems :D |
Hi there!
What about to add
Tag
entity relates many-to-many withPost
?I think it will be very useful for beginners.
I vote 馃憤 for it. What do you think?
The text was updated successfully, but these errors were encountered: