Answer the question
In order to leave comments, you need to log in
Yii2: How to make a rule for UrlManager in breadcrumbs and GridView actions?
Hello.
There is a small project, routing is made in it (I just started to deal with it). There is one of the pages in which the data is displayed through the GridView (generated by Gii).
This page has the table itself and breadcrumbs.
In breadcrumbs, the address is: " pdf.site/pdf/index " there is an extra "index"
In the actions of the table " pdf.site/pdf/update?id=9 " here I want to replace "udpate?id=9" with "update/9" "(If you just enter the URL " pdf.site/pdf/update/9 " into the address, everything works, I made a rule for this.
Please tell me, I can't figure it out.
Answer the question
In order to leave comments, you need to log in
Good afternoon.
Was the comment removed from the urlManager section in the configuration?
.htaccess file created?
It’s hard to say why this is so without code, but there are definitely two reasons:
either the url manager is not configured correctly
or you are not forming links correctly
Show your config and the code where the links are formed - there will be an answer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question