Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sahan Rodrigo 25 posts 97 karma points
    Feb 19, 2013 @ 10:54
    Sahan Rodrigo
    0

    Display specific content for target audiences depending on Member Group

    Is it possible to display specific content for target audiences depending on Member Group? 

    Current "Public Access" mechanism allowed us to provide role based restrictions for the selected page. In this case we would be able to create number of different pages depending on the number of Member Groups and assign restrictions.

    Is it possible to use same URL for those pages by overriding Umbraco page or template rendering mechanism (umbraco.library.RenderTemplate) in order to display different page / content under same URL. 

    It would be a great help if anyone can advise me on this. 

    Umbraco version 4.9.1.

    Thanks,

    Sahan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 19, 2013 @ 20:05
    Jan Skovgaard
    0

    Hi Sahan

    Could you describe the considerations you have done about the setup of your restricted content nodes? Why is it that you want to display different content on the same URL depending on the member group one belongs to? Do you need to display a whole new design since you're considering using the RenderTemplate method?

    Looking forward for having some more input on this before getting in to solution mode :)

    /Jan

  • Sahan Rodrigo 25 posts 97 karma points
    Feb 19, 2013 @ 23:37
    Sahan Rodrigo
    0

    Hi Jan,

    Thanks you very much for your reply.

    Actually, my current requirement is to create a website which facilitates to display specific dynamic content for the end user (Member) depending on their Member Group. Website editors should have facility to preview page as Member Group member s see. (some kind of option to preview as Member Group)

    Solution #1

    According to my knowledge, this could be achieved by adding code behind file for the masterpages or using loginView control. In this case I'm trying to use one template and display content depending on the Member group. (If you have any better suggestions, please let me know)

    Problem

    1. Content editor hasn't got an opportunity to preview the edited page as Member Group members see, which is a core requirement of the project. (We do not have option to view page as Member Groups or different audiences, which may be hard to implement inside the back office).
    2. I have to hard code all the member group names in code behind in order to check the correct group.
    3. In thiis case I have to keep all relevant content properties / document type properties in one document type for all the member groups for particular page / template (e.g. HomePage).

    Solution #2

    Keep separate pages for Member Groups and restrict access using back office "Public access" mechanism. In this case editor have to update multiple page content, but they would be able to preview pages as Member Group members see.

    e.g. : First create a general page as "HomePage" and then create separate child pages for Member Groups (e.g. HomePageMG1, HomePageMG2). The reason for creating these pages as child pages, we would be able to update child page content from the parent page content by using Umbraco PageEvents (e.g. UmbracoPage.Load).

    Problem

    I could not be able to use nice URL for these child pages, because of that I have been trying to render child page content using the Parent page URL (that is "HomePage"). I could't able to override the Render method of ItemRenderer Class, but  I change the ItemRenderer Class of Umbraco source code in order to get this results.  Still I am working on this task, it seems changing the ItemRenderer Class of source code may create more issues.

    Please can you check my requirements and suggest me the best achievable solution. 

    Many thanks,

    Sahan

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft