Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Subscription Questions View modes: 
User avatar
Member
Member
martinagency - 2/14/2011 5:42:46 PM
   
Subscription Questions
During our Intranet meeting today a couple of questions came up that I need some guidance on implementing:

1. When a user subscribes to a post (blog & forum) can we create a "Feed" page that displays the posts that the user subscribed to and a page that displays all posts? Displaying all posts should be easy with a repeater, but can we also show posts that they subscribed too?

2. Can we redirect the user to their department page and then they can navigate to other departments? Each user is assigned to a department, when they click on the department page how can we redirect them to their department page?

3. Can we easily create a way that people can comment on news articles and subscribe to the news article and display them like number 1 using a repeater?

Thanks for your time!

User avatar
Member
Member
martinagency - 2/14/2011 7:43:18 PM
   
RE:Subscription Questions
I think I found some of the answers when I was reviewing the documentation a little more.

- Use message board module to any document for comments.
- Use the subscription module to display user subscriptions.

No I am wondering if we can list the latest blogs and news items with the last two comments/messages and allow the user can click "view more comments" and I was also wondering if the subscriptions allows the user to view a feed of the subscriptions.

I still need help with number 2 above. Thanks.

User avatar
Member
Member
martinagency - 2/20/2011 11:04:27 PM
   
RE:Subscription Questions
I started working on the department section of the intranet and I was wondering if anyone had any suggestions on the following:

2. Can we redirect the user to their department page when they click on departments. Each user is assigned to a department, when they click on the department page how can we redirect them to their department page?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 2/22/2011 3:56:12 AM
   
RE:Subscription Questions
Hello,

regarding the departments: you can use a redirection by for example Random redirection web part. If you set up only one Redirection URL there, it is a static redirection.

You can use macros in the Redirection URL property of that web part. Even the custom macros: Macro documentation.

So, for example, you can use the Redirection URL like ~/{%currentuser.username%}.aspx and then it will redirect the user to <domain>/Administrator.aspx (if the current user is administrator). You can develop a custom macro and decide the output according to the current context values.

Best regards,
Helena Grulichova

User avatar
Member
Member
martinagency - 2/22/2011 9:10:05 AM
   
RE:Subscription Questions
Thanks for the info above. I'm still wrapping my head around the macro expressions and I'm hoping to have a little guidance on the info below:

When an authenticated user clicks on departments I want them to be redirected to their department by default. In the macro I'm assuming I need to look up the users role and match it to the department roles.

In the default "MyDepartmentsList" repeater the where condition is:

NodeID IN (SELECT ACLOwnerNodeID FROM View_CMS_ACLItem_ItemsAndOperators WHERE ((Allowed & 1) >= 1) AND (RoleID IN(SELECT RoleID FROM CMS_UserRole WHERE UserID = '{%CurrentUser.UserID%}')))

Is there a wat to use this query to manage the redirect?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 2/28/2011 9:08:17 AM
   
RE:Subscription Questions
Hello,

you could check the roles of current user in the custom macro like: API sample how to check user's roles.

API Reference

Best regards,
Helena Grulichova