Copied to clipboard

Flag this post as spam?

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


  • Amigo 243 posts 568 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 )

Please Sign in or register to post replies

Write your reply to:

Draft