I created a navigation menu in yii2 and i have links generated by the following code: but title attribute doesn’t work. What i m doing wrong?? Answer OK, finally i managed to make it work with the help of Michal HynĨica. I had to use options key: so the code should be:
Tag: yii2
How to Manage Assets in yii2 using twig in child template?
I want to extend my base twig template with some asset bundles and add new assets in child template. So I got error “A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?” So need I to set each asset to blocks? That is uncomfortable
How to add different and common classes in radioList() in yii2
This is the chtml of radio-button in one of my update form. field($model, ‘customer_sel’)->radioList(array(‘customer’ => ‘Customer’, ‘supplier’ => ‘Supplier’, ‘…
Api of Multiple file upload in yii2
Hey there I am beginner in yii2 and learning to create a api in yii2 as I stuck when my request has given me only 1 array of file instead of multiple Below is my model file And This below code is of action in which I am uploading a multiple images And this is what i got response for
Why the session destroyed every page load in mobile browsers?
My problem is that I have a website and when I refresh the a page, the session get destroyed. This means I lost my cart, my wishlist, etc… It happens in Safari and Firefox too, but on my PC the session stays there. This is not an incognito tab/window, I not deleting my cookies and/or session data between refreshes and
How do I add a filter on yii2 models
I have a query used to read data from a view. I am then applying a non related sql filter to this, to take out the models I don’t need and then returning an arrayDataProvider instance. The filter I am applying is the promotion period. However, when I pass query params to this search model, it doesn’t work. How do
Yii2, get an average value from timestamps
I have a basic table with orders, which have a field thats called created_at which is in timestamp format and I want to get the avarage on how many orders have been created per day. Found a other similar qestion about something like mine question whichI have posted below in the hope that everybody understand what im trying to do.
Yii2 shows White Screen Error on production
Recently I’m facing some issues when I deploy my code to live server. It returns me white screen error. When I tried to debug the issues using the below code, ini_set(‘display_errors’,true); …
yii2 identity session expiry
I am new to yii2 framework and I am facing a problem with the identity. when the session timeouts or when I change my user status to inactive I am getting an error of Trying to get property of non-…
Yii2 Dynamic Form Error on Create – The ‘model’ property must be set and must extend from ‘yiibaseModel’
In Yii2, I have been trying to create a dynamic form using the below tutorials. Yii2-dynamicForm – GitHub and Youtube Tutorial. I followed the same step as mentioned in tutorials, unfortunately I …