DevGroup-ru / dotplant2

E-Commerce CMS - Yii Framework 2 (yii2, shop)
http://dotplant.ru/
Other
640 stars 253 forks source link

more clarity to page aliases #353

Closed Philosoft closed 7 years ago

Philosoft commented 7 years ago

IMHO, it's far more predictable to have @page & @pages instead of @article & @articles, especially for module Page and model Page

fps01 commented 7 years ago

I think @article and @articles aliases are equal. @Philosoft can you check it?

Philosoft commented 7 years ago

mm. nope. https://github.com/DevGroup-ru/dotplant2/blob/master/application/modules/page/models/ConfigConfigurationModel.php#L144-L150

Philosoft commented 7 years ago

Here we go. PageRule decides which action to use (show or list) upon Page::$show_type attribute and it alone. Therefore it does not matter what specific route /page/page/show or /page/page/list would be used, hence @page, @pages, @article and @articles aliases would be essentially equal.

I prefer to leave @articles be with backward compatibility in mind.