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 )

37514 put(a) pogledan, 8 odgovor(a) 14.6.2014. 10:59:29Kreirao(la) Zoomicon
Zoomicon

Zoomicon

14.6.2014. 10:59:29
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
Ovaj sadržaj još nije ocijenjen. 
2793 Reputacija 345 Ukupno objava
Zoomicon

Zoomicon

14.6.2014. 13:10:47
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
Ovaj sadržaj još nije ocijenjen. 
2793 Reputacija 345 Ukupno objava
mzilic

mzilic

16.6.2014. 9:44:34
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
Ocjena 5,00, 1 glas(ova). 
2218 Reputacija 300 Ukupno objava
Zoomicon

Zoomicon

21.6.2014. 22:12:36

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

Ovaj sadržaj još nije ocijenjen. 
2793 Reputacija 345 Ukupno objava
Zoomicon

Zoomicon

21.6.2014. 22:13:19
...for example also if I have some help text / manual somewhere I could point the user to /profile/ to see/edit their profiles
Ovaj sadržaj još nije ocijenjen. 
2793 Reputacija 345 Ukupno objava
mzilic

mzilic

22.6.2014. 16:28:27
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
Ovaj sadržaj još nije ocijenjen. 
2218 Reputacija 300 Ukupno objava
Zoomicon

Zoomicon

23.6.2014. 1:15:42

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?

Ovaj sadržaj još nije ocijenjen. 
2793 Reputacija 345 Ukupno objava
imarusic

imarusic

23.6.2014. 8:12:12
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.
Ocjena 5,00, 1 glas(ova). 
3016 Reputacija 428 Ukupno objava