Mono Support Profile url 

Viewed 37277 time(s), 8 post(s), 6/14/2014 10:59:29 AM - by Zoomicon
6/14/2014 10:59:29 AM
2793 Reputation 345 Total posts

I'd like the http://social.clipflair.net/profile/ URL to show the current logged-in user's profile, but it doesn't, it expect me to enter URL http://social.clipflair.net/profile/George - That way I can't easily add a Profile link as a menu item under the Social menu there

1
6/14/2014 1:10:47 PM
2793 Reputation 345 Total posts

wonder if I can use variables in the URLs one can give to menu items, e.g.
http://social.clipflair.net/profile/{UserName}
or something like that

2
6/16/2014 9:44:34 AM
2218 Reputation 300 Total posts

Hello,

This feature is not available out of the box in MonoX. However, it is very easy to add it to your website. The UserProfile will fallback to the currently logged in user profile in-case no UserName parameter is detected. Therefore all you have to do is to create a new rule in your web.config to catch http://social.clipflair.net/profile/ without any additional parameters.

Regards,
Mario

3
6/21/2014 10:12:36 PM
2793 Reputation 345 Total posts

so once I catch the /profile/ what would I do with it (from web.config)? Do rewrite rules take parameters, e.g. to be able to convert ..../profile/ to ...../profile/{UserName}? Not sure what the rule should give as output and how it could be done (what I want is to be able to go to the current logged-in users profile via a URL without have to write in the url the username [so that the URL is reusable])

4
6/21/2014 10:13:19 PM
2793 Reputation 345 Total posts

...for example also if I have some help text / manual somewhere I could point the user to /profile/ to see/edit their profiles

5
6/22/2014 4:28:27 PM
2218 Reputation 300 Total posts

Hello,

As I mentioned you'd need to create a new web.config rewrite rule to catch /profile/ only without any additional parameters. If you do that MonoX fallback mechanism will kick in and show the profile of the currently logged in user. Our rewrite engine is based on the URL Rewriter.NET if you need any further assistance or documentation in creating this rewrite rule: http://urlrewriter.net/

Regards,
Mario

6
6/23/2014 1:15:42 AM
2793 Reputation 345 Total posts

if I understand rewrite rules correctly, you have an input and an output expression, so if the input expression was to catch "...../profile/" what would the output expression do? (that is into what form should I rewrite it?). Or do you mean that I can skip the output expression at the rewrite rule?

7
6/23/2014 8:12:12 AM
3016 Reputation 428 Total posts

Hi,

you can use similar approach to rewrite your profile url:

<rewrite url="^(.*)/profile/(\?(.+))?$" to="$1${UserProfileFolder}MyWall.aspx?&$2" name="Profile1" urlPattern="/profile/" />
Regards.

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