dynamic pages

so there is for example an e-shop

I need a hint, links,… How to solve this:

  1. display always user name as a link.

the link leads to a page, where are displayed all user’s orders.

The issue is how to create a page which would display only the orders related to the user referenced in the link.

what is the best sustainable way to do it?

  1. statistics - top ten users who has most orders in the history and from the last 2 months.

Hi palva

  1. add in your eshop layout the link of the current user only if Yii::app()->user->id is not null

To add user id see below



The link should point to a specific controller/action that implements and render the orders of the current Yii:app()->user->id

  1. Create a widget to do this and then render the widget in eshop layout