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.

Group Page URL Rewrite   (Mono Support )

27123 put(a) pogledan, 7 odgovor(a) 22.1.2013. 4:00:17Kreirao(la) sam0864

Povezane teme

sam0864

sam0864

22.1.2013. 4:00:17
I have few groups and created custom page for each group. For example, I have Web Design group. Using groups.aspx code, I customized it for Web Design group and named it as WebDesignGroup.aspx. I want to update the URL for this group to be (http://localhost/WebDesign)
I used this code
<rewrite url="^(.*)/Webdesign/(.*)?$" to="$1/MonoX/Pages/SocialNetworking/WebDesignGroup/GroupView/ogTE0Fmv1E6yrZ2lAYWbkg/Web-design/$2" name="WebDesign" defaultPage="/MonoX/Pages/SocialNetworking/WebDesignGroup/GroupView/ogTE0Fmv1E6yrZ2lAYWbkg/Webdesign/" urlPattern="/Webdesign/{PageName}" />

but the problem I lose the custom URL once the user navigate to the group discussion board and topics

I want to continue use and keep the same URL logic for any inherited links
for example the URL should look like - if possible -

http://localhost/WebDesign/
http://localhost/WebDesign/Discussion/***
http://localhost/WebDesign/Topics/****

I don't want to go back to URL like this one
http://localhost/MonoX/Pages/SocialNetworking/Groups/dboard/djwRhTGJa0y3rZ2lAYXIXw/Web-design/?GroupId=ogTE0Fmv1E6yrZ2lAYWbkg&iwm=DiscussionBoard
or
http://localhost/MonoX/Pages/SocialNetworking/Groups/dtopic/7ML63pf5W02M_qE4AZtvww/Testing-Web-Design-Group-Discussion-Board/?GroupId=ogTE0Fmv1E6yrZ2lAYWbkg&iwm=DiscussionBoard

Assuming I know the group ID



Ovaj sadržaj još nije ocijenjen. 
656 Reputacija 79 Ukupno objava
Zoomicon

Zoomicon

22.1.2013. 7:30:35

maybe if you moved those pages to the top folder instead?

btw, apart from url rewrite on mozilla, chrome (not ie) one can use javascript history api I think to change address bar

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

sam0864

22.1.2013. 17:14:55
Does it make a difference?

My issue is with updating Discussion boards/topics group internal URLs to be look like
http://localhost/WebDesign/Discussion/***
http://localhost/WebDesign/Topics/****

Ovaj sadržaj još nije ocijenjen. 
656 Reputacija 79 Ukupno objava
sam0864

sam0864

23.1.2013. 20:43:35
Any tips/suggestion??
Ovaj sadržaj još nije ocijenjen. 
656 Reputacija 79 Ukupno objava
kpeulic

kpeulic

24.1.2013. 13:56:06
Our suggestion is to don't change the root of the Groups URL, because it is very complex functionality and if you change that you can provide a lot of problems. 

Can you tell us what you trying to do? Maybe we can help you with other suggestions.
Ovaj sadržaj još nije ocijenjen. 
1849 Reputacija 181 Ukupno objava
sam0864

sam0864

25.1.2013. 6:11:59
Assume, I have three main groups (group1, group2, and group3). I created the three group and want to customize each group page. I customized groups.aspx code for each group and renamed to customgroup1.aspx, customgroup2.aspx,..

Since I know group ID of each group, I want to organize and simplify the URL to access each group
Something like
http://localhost/group1/
or
http://localhost/mygroups/group1

I was able to update the rewrite parameters to access the group with simple URL. I need help in updating the internal group links (such as photos, discussion boards, topics,..) and continue using the same URL pattern
for example
http://localhost/mygroups/group1/discussiion/*/*/*
and
http://localhost/mygroups/group1/topics/*/*/





Ovaj sadržaj još nije ocijenjen. 
656 Reputacija 79 Ukupno objava
khorvat

khorvat

25.1.2013. 8:41:01
Hi Sam.

Group WebPart is very complex control that uses by default three large sections (Wall notes, Discussion boards & Photo galleries), every section for it self has a few rewriting rules that are built to manage rewriting in stand alone scenario and in group scenario. In order to point everything to your main groups you will have to change the following rules:

<!-- social networking general -->
<rewrite url="^(.*)/RequestConfirmation/(.*)/(.*)/(\?(.+))?$" to="$1/MonoX/Pages/MonoX/Confirmation.aspx?RequestType=$2&RequestId=$3&$5" name="RequestConfirmation" urlPattern="/RequestConfirmation/{RequestType}/{RequestId}/" />
<!-- Photo Gallery -->     
<rewrite url="^(.*)/(.*)/activeview/(.*)/albumview/(.*)/(\?(.+))?$" to="$1/$2.aspx?AlbumId=$4&activeview=$3&$6" name="PhotoList" defaultPage="/MonoX/Pages/SocialNetworking/PhotoGallery.aspx" urlPattern="/{PageName}/{ActiveControlAction}/{ActiveControlValue}/{AlbumView}/{AlbumId}/" />
<rewrite url="^(.*)/(.*)/activeview/(.*)/photoview/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?FileId=$4&AlbumId=$5&activeview=$3&$7" name="PhotoView" defaultPage="/MonoX/Pages/SocialNetworking/PhotoGallery.aspx" urlPattern="/{PageName}/{ActiveControlAction}/{ActiveControlValue}/{PhotoView}/{PhotoId}/{AlbumId}/" />
  <!-- discussion board -->
  <rewrite url="^(.*)/(.*)/dboard/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?boardId=$3&$6" name="Discussion" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dboard/{BoardId}/{Slug}/" />
  <rewrite url="^(.*)/(.*)/dtopic/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?topicId=$3&$6" name="DiscussionTopic" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dtopic/{TopicId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/dfilter/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&$6" name="DiscussionTopicFilter" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter/{FilterType}/{Slug}/" />
<rewrite url="^(.*)/(.*)/dfilter-tag/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?tftype=$3&dbtTag=$4&$6" name="DiscussionTopicTagFilter" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dfilter-tag/{FilterType}/{Slug}/" />
  <rewrite url="^(.*)/(.*)/dmessage/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?dmsgId=$3&dmsgMode=$4&$6" name="DiscussionEditMessage" defaultPage="/MonoX/Pages/SocialNetworking/Discussion.aspx" urlPattern="/{PageName}/dmessage/{MessageId}/{Mode}/" />
and maybe these, if you want to enable direct group editing on your main groups:

<!-- dynamic group rules, can be used regardeless of the actual name of the page that holds group parts -->
<rewrite url="^(.*)/(.*)/GroupView/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?GroupId=$3&$6" name="GroupView" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupView/{ShortId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/GroupEdit/(.*)/(.*)/(\?(.+))?$" to="$1/$2.aspx?GroupId=$3&EditMode=true&$6" name="GroupEdit" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupEdit/{ShortId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/GroupList/(\?(.+))?$" to="$1/$2.aspx$3" name="GroupList" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupList/" />
<rewrite url="^(.*)/(.*)/GroupInsert/(\?(.+))?$" to="$1/$2.aspx?InsertMode=true&$4" name="GroupInsert" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupInsert/"/>
<rewrite url="^(.*)/(.*)/GroupSearch/(.*)/(\?(.+))?$" to="$1/$2.aspx?SearchValue=$3&$5" name="GroupSearch" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupSearch/{SearchValue}/" />
<rewrite url="^(.*)/(.*)/GroupSearch/(\?(.+))?$" to="$1/$2.aspx?ShowAllGroups=true&$4" name="GroupSearchShowAll" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupSearch/" />
<rewrite url="^(.*)/(.*)/GroupCategory/(.*)/(\?(.+))?$" to="$1/$2.aspx?Category=$3&$5" name="GroupCategory" defaultPage="/MonoX/Pages/SocialNetworking/Groups.aspx" urlPattern="/{PageName}/GroupCategory/{CategorySlug}/" />
NOTE: If you change these rules to point to your main groups you will lose the rewriting functionality for other groups and those WebPart in stand alone usage. 

I'd suggest you to another approach as this one will require a lot of effort and you will lose some functionality, why don't you go with changing the group rewriting to point to some "static page" and then on that page you handle the custom styling and WebPart for that specific group ?

Regards
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava