Wiki

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

Creating a Dependent Dropdown From Scratch in Yii2

Updated 26 days ago by alraziHow-tos4 comments – viewed 75,994 times – ( +8 / -1 ) – version 2.0
I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I can't implement it in Yii2 because Yii2 does not have built-in AJAX functionality hem.. I searched about it and came across this post

How to get SEO friendly URL using Model and new getUrl() function

Updated 2 months ago by shivHow-tos0 comments – viewed 3,915 times – ( +1 ) – version 2.0
We all need SEO friendly URLs for our projects. its not always good to call route with params so we can generalise it for all models using a common function.

How to have truly multilingual URLs

Updated 4 months ago by Maurizio Domba CerinHow-tos1 comment – viewed 5,968 times – ( -1 ) – version 1.1
We can easily have a multilingual site if we put a "lang" parameter that comes via GET. For example:

How to resize an image proportionally

Updated 6 months ago by AndroideLPHow-tos1 comment – viewed 6,949 times – ( +1 ) – version 2.0
Using the imagine extension is very simple Create this in your component:

Write & use a custom Component in Yii2.0

Updated 6 months ago by Maurizio Domba CerinHow-tos4 comments – viewed 74,914 times – ( +18 / -1 ) – version 2.0
This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

Displaying image in a CGridView column.

Updated 6 months ago by Maurizio Domba CerinHow-tos5 comments – viewed 63,897 times – ( +13 / -2 ) – 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

Storing your images in your table's blob field and displaying that stored images.

Updated 6 months ago by Maurizio Domba CerinHow-tos7 comments – viewed 34,985 times – ( +9 / -2 ) – version 1.1
He im giving you a very simple example ie how you can store an image to your blob field in a table.Hope you already familiar with the normal image upload.
tags: blob, image

How to make UrlManager createAbsoluteUrl work with sub-domains

Updated 8 months ago by Wade ShulerHow-tos1 comment – viewed 9,130 times – ( +2 / -1 ) – version 2.0
Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Updated 8 months ago by Gerhard LiebenbergHow-tos3 comments – viewed 22,258 times – ( +8 / -2 ) – version 1.1
Countries sometimes change their laws pertaining to time zones and daylight saving times. This means that GMT+2 can be a different local time this August compared to last August! It could even be a different date!

Using loginRequiredAjaxResponse to solve ajax session timeout

Updated 11 months ago by RutgerHow-tos3 comments – viewed 28,095 times – ( +13 / -1 ) – version 1.1
This solution requires Yii 1.1.9 or above