Wiki

Articles tagged with "dynamic", sorted by date (updated)X
Displaying 1-4 of 4 result(s).

How to store array/widget configuration to the database with config validation rules

Updated 2 months ago by Kartik VTutorials0 comments – viewed 1,165 times – ( +26 / -4 ) – version 2.0
You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:

Dynamic Sidebar using CClipWidget

Updated 7 months ago by CozumelHow-tos5 comments – viewed 21,372 times – ( +21 ) – version 1.1
Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly.

Dynamic parent and child CGridView on single view. Using $.ajax to update child gridview via controller, after row in parent gridview was clicked.

Updated 8 months ago by Gerhard LiebenbergTutorials20 comments – viewed 57,276 times – ( +24 / -1 ) – version 1.1
This wiki is a step-by-step example explaining how the controller, model and the view's CGridView work together. It explains simple things - as well as more complex things that you will anyway quickly have to know. So, even if you don't use dynamic gridviews, take a morning off and thoroughly work through this tutorial. It should save you lots of struggling.

Multiple Database Connection : Select database based on login user id, Dynamic

Updated 11 months ago by Rajith RHow-tos3 comments – viewed 10,936 times – ( +9 / -6 )
create a class file under protected\components named RActiveRecord.php