Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 81-90 of 322 result(s).

Handling Bootstrap active tabs in Yii via URL

Created about a year ago by JamesBarnsleyHow-tos6 comments – viewed 17,516 times – ( +7 ) – version 1.1
As a lead developer at Mutable Labs I found that when using the Yii Bootstrap tabs component you will sometimes want to direct the user to a specific tab and not necessarily the first tab. Yii Bootstrap already provides the "active" variable so you can define whether the tab is the active tab or not in PHP. I generally find though that a PHP solution to this problem is rather cumbersome as every tab component will need the PHP code inserted or you will have to extend the tab component somehow to do it.

Bootstrap Yii cGridView add popup button

Created 6 months ago by Arockia JohnsonHow-tos6 comments – viewed 4,836 times – ( +3 ) – version 1.1
Hi,

Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

Created 5 months ago by ThePr0f3550rHow-tos6 comments – viewed 13,711 times – ( +11 ) – version 2.0
Yii2 comes with a charming twitter bootstrap version 3. But if it is less, then you can integrate with web templates that you like. One example is wonderfull template "adminLTE"
tags: yii2, theme, adminLTE

CGridView Date Range Without Cookies or Session (External Filtering)

Created about a year ago by ezekielnoobHow-tos5 comments – viewed 7,762 times – ( +4 )
Here's a tutorial on how to create a CGridView with external date filters the trick is to create hidden columns within the CGridView Filters something like in the example below:

CGridView keep state of page and sort.

Created 2 years ago by DanielHow-tos5 comments – viewed 20,306 times – ( +6 ) – version 1.1
Remember-filters-gridview is one of the must-use extension on all of my project. However, it lacks of storing the page and sort variables of the grid view.

Displaying image in a CGridView column.

Created 2 years ago by sirin kHow-tos5 comments – viewed 47,512 times – ( +13 / -1 ) – version 1.1
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
tags: CGridView, image

CSV Export

Created 2 years ago by JohnPollardHow-tos5 comments – viewed 12,066 times – ( +4 ) – version 1.1
I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.
tags: csv, export

Using SQLite and CDbMessageSource as a module

Created 2 years ago by pheadeauxHow-tos5 comments – viewed 10,875 times – ( +5 ) – version 1.1
There are scenarios when you work with DVCS (like Mercurial or Git) and CDbMessageSource. To my experience keeping the development database and production database in sync can be very time consuming. Plus, when working in a team, you never know when the database was updated.

Take more control of CGridview and model searching (related model or another controller)

Created about a year ago by KonApazHow-tos5 comments – viewed 19,019 times – ( +5 ) – version 1.1
Suppose you have an Application in Yii that manages hotels each one has many customers.

Dynamic Sidebar using CClipWidget

Created 3 years ago by SheldmanduHow-tos5 comments – viewed 22,875 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.