Copied to clipboard

Flag this post as spam?

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


  • Amigo 231 posts 506 karma points
    Jun 09, 2015 @ 17:50
    Amigo
    1

    member login and mvc view

    Hi,

    Can I somehow test for member login and a specific member group in my template?

    I need to show a partial view in my template, only if user belong to a specefic member group, and if current pageid is xxxx

    Thanks ;-)

  • Scott Devine 8 posts 73 karma points
    Jun 12, 2015 @ 03:48
    Scott Devine
    0

    Try this

    @if (Members.IsLoggedIn() && User.IsInRole("Role Name") && CurrentPage.id = xxx )

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies