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

Viewed 25801 time(s), 6 post(s), 4/11/2015 7:45:02 PM - by swalsh
4/11/2015 7:46:16 PM
70 Reputation 10 Total posts

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

1
4/13/2015 7:29:06 AM
3016 Reputation 428 Total posts

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

2
4/13/2015 4:44:50 PM
70 Reputation 10 Total posts

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

3
4/14/2015 7:02:11 AM
3016 Reputation 428 Total posts

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.

4
4/14/2015 7:24:44 PM
70 Reputation 10 Total posts

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

5
4/15/2015 6:41:44 AM
3016 Reputation 428 Total posts

Hi Shawn,

we are glad that MonoX fits your needs.

Regards.

6
This is a demo site for MonoX. Please visit Mono Software for more info.