Wiki articles

Showing 41-60 of 147 items.

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Created 6 years ago by Kartik V, updated 2 years ago by alrazi.

Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).

2 2
47 followers
Viewed: 55 617 times
Version: 2.0
Category: Tips

Creating a Dependent Dropdown From Scratch in Yii2

Created 6 years ago by ThePr0f3550r, updated 2 years ago by alrazi.

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

4 1
11 followers
Viewed: 113 882 times
Version: 2.0
Category: How-tos

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

Created 2 years ago by shiv, updated 2 years ago by shiv.

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.

2 0
1 follower
Viewed: 19 289 times
Version: 2.0
Category: How-tos

Write & use a custom Component in Yii2.0

Created 5 years ago by sirin k, updated 3 years ago by Maurizio Domba Cerin.

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)

13 0
11 followers
Viewed: 104 421 times
Version: 2.0
Category: How-tos

Building a REST API in Yii2.0

Created 5 years ago by sirin k, updated 3 years ago by Maurizio Domba Cerin.

This is wiki page is useful if you are trying to build a customized REST API in Yii2.0

4 0
16 followers
Viewed: 134 155 times
Version: 2.0
Category: Tutorials

Working with relational removals by yii2

Created 3 years ago by AndroideLP, updated 3 years ago by Jairus Martin.

This tutorial shows you how to safely remove records between relationships.

0 0
2 followers
Viewed: 24 516 times
Version: 2.0
Category: Tutorials

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 7 years ago by Luis Lobo Borobia, updated 3 years ago by Luis Lobo Borobia.

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2 followers
Viewed: 9 805 times
Version: all
Category: Tips

Show raw SQL query

Created 3 years ago by darioo, updated 3 years ago by darioo.

Here's a quick tip to dump the SQL for query.

15 0
4 followers
Viewed: 131 037 times
Version: 2.0
Category: FAQs

REST API and null values in XML

Created 3 years ago by marko60, updated 3 years ago by marko60.

I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the eleme...

0 0
0 follower
Viewed: 14 447 times
Version: 2.0
Category: Tips
Tags: null, REST, XML

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Created 3 years ago by Amjad Khan, updated 3 years ago by Amjad Khan.

Following is the table structure

tblgroups

CREATE TABLE IF NOT EXISTS `tblgroups` (
  `id` int(11) NOT NULL,
  `groupname` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive',
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

tblcontacts

2 1
6 followers
Viewed: 63 397 times
Version: 2.0
Category: Tutorials

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Created 3 years ago by emrald, updated 3 years ago by emrald.

Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

1 0
3 followers
Viewed: 10 997 times
Version: 2.0
Category: Tutorials

Installation guide: Yii-2 advanced template with RBAC system

Created 3 years ago by Sherin Jose, updated 3 years ago by Sherin Jose.

Welcome, all of you !

8 1
19 followers
Viewed: 92 924 times
Version: 2.0
Category: Tutorials
Tags: install, rbac, yii2

A universal model attribute for its synthetic representation

Created 3 years ago by Alexandre Rodichevski, updated 3 years ago by Alexandre Rodichevski.

It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.

0 0
3 followers
Viewed: 9 467 times
Version: 2.0
Category: Tips

Boost composer-asset-plugin update speed

Created 4 years ago by schmunk, updated 3 years ago by samdark.

If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

6 0
6 followers
Viewed: 21 597 times
Version: 2.0
Category: Tips

A Single Page with a List and a Detail

Created 3 years ago by softark, updated 3 years ago by Patrick Jones.

The CRUD generator of Gii has done a wonderful job for you, and you already have a list of items in the "index" page and a detailed view of a specified item in the "view" page.

2 0
3 followers
Viewed: 22 443 times
Version: 2.0
Category: How-tos

How To: Custom Client Validation On Checkbox Toggle and Optional Input Field

Created 3 years ago by Wade Shuler, updated 3 years ago by Wade Shuler.

I just chased my tail around for a bit today. I got lost with setting the status of all inputs, and banging my head on why the "validate" function just wasn't working.

0 0
1 follower
Viewed: 14 638 times
Version: 2.0
Category: How-tos

Yii2cdn Component

Created 4 years ago by junaidatari, updated 4 years ago by junaidatari.

A Yii Framework 2 component for using assets in different environments (Local/CDNs)

0 0
2 followers
Viewed: 14 019 times
Version: 2.0
Category: How-tos
Tags: assets, CDN, yii2
0 0
3 followers
Viewed: 9 922 times
Version: 2.0
Category: How-tos
Tags:

How to change GridView delete confirmation message for specific controllers only?

Created 4 years ago by AlaFalaki, updated 4 years ago by AlaFalaki.

Hello,
If you want to give extra attention for some specific delete actions and you don't want to override whole yii.confirm JS method here is what you can do:
(I've only put the ActionColumn part of the GridView here to just give you the idea)

3 0
4 followers
Viewed: 36 060 times
Version: 2.0
Category: Tips

Escape from Default's Yii2 Delete Confirm Box

Created 6 years ago by Antonio Ramirez, updated 4 years ago by Cozumel.

If you started playing with Yii2's new GridView, you will soon realize that some things have improved quite a lot, but I am sure its going to be a bit confusing at first glance when you try to modify certain javascript behaviors like for example, its delete confirmation dialog box.

4 1
16 followers
Viewed: 36 881 times
Version: 2.0
Category: How-tos