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.

Profile url  (Mono Support )

Viewed 15455 time(s), 8 post(s) 6/14/2014 10:59:29 AMby Zoomicon
Zoomicon

Zoomicon

6/14/2014 10:59:29 AM
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
This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/14/2014 1:10:47 PM
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
This content has not been rated yet. 
2793 Reputation 345 Total posts
mzilic

mzilic

6/16/2014 9:44:34 AM
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
Rated 5.00, 1 vote(s). 
2218 Reputation 300 Total posts
Zoomicon

Zoomicon

6/21/2014 10:12:36 PM

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])

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/21/2014 10:13:19 PM
...for example also if I have some help text / manual somewhere I could point the user to /profile/ to see/edit their profiles
This content has not been rated yet. 
2793 Reputation 345 Total posts
mzilic

mzilic

6/22/2014 4:28:27 PM
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
This content has not been rated yet. 
2218 Reputation 300 Total posts
Zoomicon

Zoomicon

6/23/2014 1:15:42 AM

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?

This content has not been rated yet. 
2793 Reputation 345 Total posts
imarusic

imarusic

6/23/2014 8:12:12 AM
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.
Rated 5.00, 1 vote(s). 
3016 Reputation 428 Total posts