jilonuts.blogg.se

Jquery tagit match
Jquery tagit match





jquery tagit match
  1. #Jquery tagit match update
  2. #Jquery tagit match code

When I create a new article (or news) in my tags field an empty tag appears. In the form file "_form.php" i had to implode the tags: The first missing information is to create a json.php in views/tag that delivers the tags from the database.Īn example can be found at h t t p:///blog/post/2/yii-tag-it-widget.īut I had to modify it, since i have no $tag->slug.Īfter that I had to add "json" to the accessRules in TagController. I am using the modified version of Yii tag it from Sam Dark. Hi, i just followed Antonio Ramirez´s instructions but have a problem.

#Jquery tagit match code

I need this solution, but I hope to learn a better way to code this. I like this! Is 2.0!!! But Its also the worst way to code. ') Īlso note that when you add a category in the modal dialog, this will appear in modal list and also in form page. Notes that the list of tags in the form is a new controller:Įcho ''. 'onclick' => '$("#mydialog").dialog("open") return false ', 'style' => 'color: darkred text-decoration: none ', $this->renderPartial('/site/pages/addTag') The idea is that if a category is not in the list, I permit users to add on the fly new category. These is becaouse I want to keep translations of each categori. In form page, I show a textField that shows categories and I’ve an hidden field that contains ids of these categories. This is what I’ve done and what people DONT have to do =): Nevertheless, I truly hope my hints will help you to get to the right track. The information of the Tag Widget and Taggable Behavior are quite good and was easy to follow. * integer $id the ID of the model to be updated

#Jquery tagit match update

* If update is successful, the browser will be redirected to the 'view' page. Uncomment the following line if AJAX validation is needed * If creation is successful, the browser will be redirected to the 'view' page. $tags = Tag::model()->findAll($criteria) $criteria->addSearchCondition('name', $_GET) Header('Content-type: application/json') Header('Cache-Control: no-cache, must-revalidate') 'class'=>'.ETaggableBehavior',Ĭreate an action on your TagController that receives the calls of autocomplete Tag Widget autoloading model and component classes Put the extension into protected/behaviors/model/Ĭhange my config to import the classes of the extension (you set up your news table as you wish (same as your tag and news_tag tables, i normally use a table prefix) Created a table tbl_tag (id, name, frequency)Ĭreated a table tbl_news_tag (newsId, tagId)







Jquery tagit match