MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

How to Create Custom Pages Per User in UserProfiles ?  (Mono Support )

Viewed 22400 time(s), 6 post(s) 4/11/2015 7:45:02 PMby swalsh

Related topics

swalsh

swalsh

4/11/2015 7:46:16 PM
Hi, I am experimenting with MonoX and I really like what I see.   I can see that it fills a lot of the need that I have and by being able to use the base framework with authentication, blogs, cms, groups and all the other features it would keep me from my clients paying me to write all of that myself.    So my question is... the app that I am writing has a need to be able for me (not the user) to be able to add more custom pages at a user level....for example, one would be a dashboard to show a snapshot of account balances, their overall spend, etc.  Another page might be something like a checkbook register, another one might be a summary of spend by store, etc.   Obviously I know I would need the source code license for this extension, however I would like to use MonoX as a framework.    As a test, in the portal admin I added a new page called UserDashboard in the User Profiles folder however when logged in as the user I can't browse to it.  Does MonoX support the addiition of 'n' pages at a user level, with security that only they (or other roles as assigned) can see or edit?

Thank you
Shawn
This content has not been rated yet. 
70 Reputation 10 Total posts
imarusic

imarusic

4/13/2015 7:29:06 AM
Hi,

you can add additinal pages in two ways. First one is to add it dynamically via administration(this approach is generally used when you want drag&drop existing MonoX web parts). Other way is to create page(as you already did) and code additional custom functionality. Security can be also set via MonoX administration, but you can also implement it on the page level in the code(You need to extend existing MonoX BasePage and set CustomAccessRoles property on init, before base init method.)

Please provide us with more details regarding the issue you are facing with the new page that you've already created.

Regards
This content has not been rated yet. 
3016 Reputation 428 Total posts
swalsh

swalsh

4/13/2015 4:44:50 PM

Hi Imarusic,

Thanks for your answer.   I have had some level of success - was able to create a new page in Visual Studio in MonoX\Pages\UserProfile - and was able to add a label and set some text to the label in the code behind.   Now,  the page needs to be user specific (ie determine the logged in user Guid) and display some custom functionality for that user only, such as show his bank accounts for example.   Is there a way I can get to that, or do I need the source code license?

Thanks

Shawn

This content has not been rated yet. 
70 Reputation 10 Total posts
imarusic

imarusic

4/14/2015 7:02:11 AM
Hi,

in order to perform such an easy task, get the user id, you can use the MonoX existing functionality.

Guid currentUserId = SecurityUtility.GetUserId();

There are two options while developing site using MonoX. 

1. You can download MonoX from our site and extend/add additional functionality. This is a good approach if you do not need to amend the existing MonoX functionality. This approach requires you to buy MonoX licence which will remove "Powered by MonoX" label.

2. Buy a source code edition where you get MonoX source code. This approach allows you to view how the things are implemented and also gives you greater flexibility in the extension manner.

Please note that changes to the existing functionality  are also possible by using the first approach(an example can be found here), but in large projects it's better to have source code edition,

Regards.

This content has not been rated yet. 
3016 Reputation 428 Total posts
swalsh

swalsh

4/14/2015 7:24:44 PM

Perfect.. Thank you very direct and kind assistance.  It is much appreciated.  I am now developing a clearer understanding of how I can use and extend MonoX for the framework of at least two projects I was hired for.    Thanks for your patience with my questions!

Kind Regards,

Shawn

This content has not been rated yet. 
70 Reputation 10 Total posts
imarusic

imarusic

4/15/2015 6:41:44 AM
Hi Shawn,

we are glad that MonoX fits your needs.

Regards.
This content has not been rated yet. 
3016 Reputation 428 Total posts