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.

GroupCategory  (Mono Support )

23165 put(a) pogledan, 6 odgovor(a) 23.12.2010. 9:56:56Kreirao(la) Alby
Alby

Alby

23.12.2010. 9:56:56
Do you know if there is a way to have a page with a [b]list of all categories [/b]of groups (not only the account subscriptions, a kind of sitemap for category), and a way to [b]show all groups of a category [/b]and not only the ones you are joined?
I know the trick of using a "blank" search but...

thanx
Alby
Ovaj sadržaj još nije ocijenjen. 
0 Reputacija 4 Ukupno objava
denis

denis

23.12.2010. 18:14:29
Hi Alby,
This would require a bit of programming - we can send you the code sample (it is really simple) if you already know the basics of working with MonoX Web parts.
Ovaj sadržaj još nije ocijenjen. 
7207 Reputacija 956 Ukupno objava
Alby

Alby

4.1.2011. 11:29:32
Oh yes, it would be very useful, thank you
Ovaj sadržaj još nije ocijenjen. 
0 Reputacija 4 Ukupno objava
denis

denis

15.2.2011. 12:51:03
Hi,
After I went through your intial question again I realized that MonoX already includes a part that lists all groups of a category - it is a part that is already present on the groups page and is located in the MonoX/ModuleGallery/SocialNetworking/Groups/GroupList.ascx
You just need to pass the category name to it via its URL: http://monox.mono-software.com/MonoX/Pages/SocialNetworking/Groups/GroupCategory/Software-development/ where the "slug" of your category is Software development (slugs are automatically generated when a category is created), URL format can be controlled through the web.config settings.

As for the list of all categories, you just need to put an ordinary repeater in your custom Web part and bind it to the list of categories that is returned by the GetGroupCategories() methods in the GroupRepository class - you could also use its overload that offers a complete control over the filtering and paging features. From the top of my head, your data binding method would contain something like this:

EntityCollection<SnGroupCategoryEntity> categories = GroupRepository.GetInstance().GetGroupCategories();
rptCategories.DataSource = categories;
rptCategories.DataBind();


All properties and methods of the SnGroupCategoryEntity are exposed by IntelliSense in VS.
Ocjena 5,00, 1 glas(ova). 
7207 Reputacija 956 Ukupno objava
Alby

Alby

11.1.2011. 9:12:52
Hi Denis,
You are right, going here [url=http://monox.mono-software.com/MonoX/Pages/SocialNetworking/Groups/GroupCategory/Software-development/]http://monox.mono-software.com/.../GroupCategory/Software-development/[/url] I see all the groups connected with this category, but if you are logged in, you'll see only the one you have subscribed; so, if you are a new user it seems that the category is empty.
Could I have a list all the groups of a category even if i'm logged in and have no sobscriptions?
Ovaj sadržaj još nije ocijenjen. 
0 Reputacija 4 Ukupno objava
denis

denis

15.2.2011. 12:51:25
Hi Alby,
That is correct, the default behavior is to show only the groups that the active user is a member of. You can use other methods from the GroupRepository class to show categories with your custom filter criteria. For example, the following method signature

public List<SnGroupDTO> GetGroups(Guid userId, string category, Guid categoryId, string searchValue, bool useFullTextIndex, int pageNumber, int pageSize, out int recordCount)


shows all groups for a user with a specific UserId. If you set this parameter to Guid.Empty and pass the category ID or category name, you will get all groups in a requested category. Again, the list of SnGroupDTO can be bound to your repeater or any other similar control.
Ovaj sadržaj još nije ocijenjen. 
7207 Reputacija 956 Ukupno objava