Wiki

Articles in category "how-tos", sorted by date (updated)X
Displaying 251-260 of 355 result(s).

Create sitemap.xml file dynamically on root folder with one hit

Updated 5 years ago by kiran sharmaHow-tos1 comment – viewed 17,445 times – ( +5 / -6 ) – version 1.1
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML

Accessing data in a join table with the related models

Updated 5 years ago by kroweHow-tos8 comments – viewed 114,901 times – ( +28 / -2 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

Create your own Validation Rule

Updated 5 years ago by GismoHow-tos14 comments – viewed 204,610 times – ( +76 / -4 ) – version 1.1
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

Image resize on the fly

Updated 5 years ago by TpoxaHow-tos4 comments – viewed 23,035 times – ( +4 / -1 ) – version 1.1
For example have folder with image resources which are public accessible
tags: yii, image-resize

Using International Dates

Updated 5 years ago by nkdHow-tos4 comments – viewed 39,232 times – ( +18 / -1 ) – version 1.1
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/

Instanciar clase hija basada en campo de modelo padre (CActiveRecord)

Updated 5 years ago by robregonmHow-tos0 comments – viewed 10,104 times – ( +2 / -1 ) – version 1.1
[EN] [ES]

pass variables or content block from view file to layout file

Updated 5 years ago by Maurizio Domba CerinHow-tos0 comments – viewed 22,527 times – ( +2 / -1 ) – version 1.1
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

Create custom button button with AJAX function in CGridView

Updated 5 years ago by nkdHow-tos2 comments – viewed 55,778 times – ( +19 / -1 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

Integrating Wordpress and Yii,Working Out The Details.

Updated 5 years ago by drumaddictHow-tos4 comments – viewed 24,769 times – ( +8 / -1 ) – version 1.1
This article is based on fr0d0z's article Integrating Wordpress and Yii: still another approach, using Yii as the router/controller and provides more details on how to set up this integration.To be more specific,the idea is not to use any main.php layout in Yii's controllers.This gives the advantage that we do not need to modify any Yii code when we switch a theme in WordPress admin panel,provided we have done a very basic setup which I explain below.
tags: wordpress