@
@
@Insout2017-01-22 13:37:09
Yii
@Insout, 2017-01-22 13:37:09

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

2 answer(s)
D
Dmitry, 2017-01-22
@slo_nik

Good afternoon.
Was the comment removed from the urlManager section in the configuration?
.htaccess file created?

M
Maxim Timofeev, 2017-01-25
@webinar

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 question

Ask a Question

731 491 924 answers to any question