adrianmak Posted March 19, 2016 Share Posted March 19, 2016 There is dashboard for back-end admin. How about a dashboard for front-end user ? look like http://www.mydomain.com/dashboard/[0-9] When a user registered from front-end, instead of a new user account created, the user could access his/her own dashboard at http://www.mydomain.com/dashboard/22 where 22 is the user account page id Then I could add whatever in the dashboard like order history for a e-commerce site Link to comment Share on other sites More sharing options...
Wanze Posted March 19, 2016 Share Posted March 19, 2016 ProcessWire does not separate backend and frontend user, it's up to you if you allow a user to access the backend. So the frontend dashboard could work like this: The user registers on the frontend and you create a ProcessWire user with all given information. This will also assign a unique ID to the user object. Create a template "dashboard" where you grab the user-ID via urlSegment1 Display any stuff you want in this template Cheers 3 Link to comment Share on other sites More sharing options...
kixe Posted March 19, 2016 Share Posted March 19, 2016 Create a template "dashboard" where you grab the user-ID via urlSegment1 Assuming that each user should have access only to his own account/ content, there is no need to work with UrlSegments since you have access to the $user API. The output of example.org/dashboard/ can be individually to each user. Example: Create a role 'frontenduserrole' without any permission. Create a template dashboard and a file dashboard.php like if ($user->isLoggedin() && $user->hasRole('frontenduserrole')) { echo "Welcome back $user->name"; } else echo "You need to login first."; 3 Link to comment Share on other sites More sharing options...
blynx Posted March 19, 2016 Share Posted March 19, 2016 I made something like your original idea: A website with members which are also sorted into groups. Then the url of a members dashboard is like http://website.com/groups/group34/member123 The structure: root |--groups | |--group ... | |--member | |--member |--group | |--member | |--member | |--member ... ... ... But I am not sure if I still like that approach very much ^^ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now