is there a simple way of creating a list with editable elements (add/remove) on a page?
Something simillar to the users managing list, where you can add and delete users.
For example, you got a table in DB with 2 columns - "Name" and "Value", and rows like
"Onion"-"10" and "Potato"-"20". The idea is to display the table on a page and make it editable.
Sounds simple but im new in Yii, just yesterday learned about it, did first app and other stuff from guides, but there is no guide how to create things like that manually (so far i was installing widgets mostly)
Thanks
The component you need is CGridView. Take a look to this website.
Yii Playground
Related
I am using Yii 1.1.16 for one of my projects.
I have 5 controllers at the moment, and their data is coming from their respective models.
Now I want to add new functionality into my website, regarding comments. I want to add a form at the bottom of each view, but obviously the data will be coming from another database table (I have created a new model for that).
I am confused. Should I create 5 different forms in HTML for my problem, or can I use Yii widgets functionality to implement the same?
The Comment table would be the same for every user in the database. Comments will be coming with the help of their user id, which is stored in the table, and their comment will be inserted with the help of their user id, too.
Please let me know the best solution you can think of.
I suggest to create one widget for displaying comments section and one controller for handling request from this widget (for example adding new comment or displaying different page of comments list). In this way adding comments for any section should require only few lines of code to initialize widget:
$this->widget('CommentsWidget', [
'parentId' => 'page-' . $model->id,
]);
I making a website in wordpress and I am adding some posts in it.
I am trying to make like this http://www.webmd.com/allergies/ss/slideshow-nasal-irrigation
I can add multiple text from custome fields but I am not able to to add different images with each custom field.
Can anyone give me idea about this. That how i can add images with these slides. Should I use the custom fileds or not?
Thanks
You can use install Simple field plugin. https://wordpress.org/plugins/simple-fields/
In this plugin you can create Fields you can add as many images, text fields, textareas, or any other field type, as you want to to a post.
In my Sencha Touch 2 application I have an HTML table in a view which has its ID. What I'm trying to do is do some actions, load store, create another table and append it to the existing table - without changing the view. I have no problems with making the request, creating the second table on the fly, etc, however I need to figure out how one table can be appended to another in terms of Sencha Touch? Is there an "appendTo()" function like, say, jQuery has and how can I use it? I basically need to get the table by its ID and append the new table to it. But don't know how to do that in Sencha Touch 2. Any help is greatly appreciated.
Thank you.
It depends what your view extends but if it's extending an xtype:panel then you can use getHtml() to get the existing content and then setHtml() to update it.
I'm looking for a solution for a problem...
I need a Sharepoint Field wich contains multiple link, stored in a simple way (like ';' separation).
Does anybody know if there are project 'bout custom field with multiple link and Asset picker to choose the link?
I'd like to use the Asset Picker to choose a single link, and then catch the result and append it to my custom field value.. I googled a lot looking for "how" call the asset picker from code... I hope is something like a simple dialog, but i cannot understand how to do it!
Thanks for any suggestion (about projects similar to this or how to use the asset picker)!!
I'm trying to create a new module for Sitefinity. I'm basing my module off the sample module linked to from the documentation. http://www.sitefinity.com/help/developer-manual/adding-modules-pluggable-explained.html
What I want is a list of videos. On the left-hand side - the CommandPanel - there should be 3 buttons - "Videos", "Artists" and "Genres".
Whenever either of these is selected, on the right-hand-side, a list of Videos/Artists/Genres should be displayed.
The concept is simple, but what I'm struggling with is, where to actually put the code.
Should I hard-code the list directly into CommandPanel.ascx? Am I supposed to create new controls for Videos, Artists and Genres? Or should I have one control and multiple Panels, which I show/hide? And how do I connect the menu items on the left with changing the panel on the right?
NB. I might be wrong to have Videos, Artists and Genres all on the left. Maybe it should just be "Videos", and Artists and Genres should be separate module each?
I don't need a complete answer, just some direction on how to code in this framework, and where everything should go.
Hi there I just saw this come up I am not sure if you have already started this module yet you may even be finished by now, but I just wanted to say had you checked out the Sitefinity Beta for 3.6 because they are about to simplify the whole Sitefinity module process and particularly for what you are trying to do. Check it on the Sitefinity block a barebones module with the new architecture. This I think would satisfy your needs because you can create a separate "View" for each one of your Videos, Artist and Genres and all their views like create, edit etc.