I'm trying to hide something that has a NULL result within a members area:
@if (Members.IsLoggedIn() && profileModel != null)
{
using (Html.BeginUmbracoForm<UmbProfileController>("HandleUpdateProfile", null, new { id = "updateProfileForm" }))
{
var member = Members.GetByUsername(profileModel.UserName);
var pharmacyName = member.GetPropertyValue("pharmacyName");
var contractorCode = member.GetPropertyValue("contractorCode");
var healthBoardArea = member.GetPropertyValue("healthBoardArea");
var cPHealthBoardCommittee = member.GetPropertyValue("cPHealthBoardCommittee");
@Html.Label("Name: ", new { @class = "profile-label"})
@Html.DisplayFor(m => profileModel.Name, new { @class = "profile-details"})
@Html.Raw("<br>")
@Html.Label("Email: ", new { @class = "profile-label"})
@Html.DisplayFor(m => profileModel.Email, new { @class = "profile-details"})
@Html.Raw("<br>")
@Html.Label("Pharmacy Name: ", new { @class = "profile-label"})
@Html.DisplayFor(m => pharmacyName, new { @class = "profile-details"})
@Html.Raw("<br>")
@Html.Label("Contactor Code: ", new { @class = "profile-label"})
@Html.DisplayFor(m => contractorCode, new { @class = "profile-details"})
@Html.Raw("<br>")
@Html.Label("Health Board Area: ", new { @class = "profile-label"})
@Html.DisplayFor(m => healthBoardArea, new { @class = "profile-details"})
@Html.Raw("<br>")
@Html.Label("CP Health Board Committee: ", new { @class = "profile-label"})
@Html.DisplayFor(m => cPHealthBoardCommittee, new { @class = "profile-details"})
@Html.Raw("<br>")
}
}
If there is no output detected for CP Health Board Committee, id like this whole block hidden. Could someone point me in the right direction. Apologies for the vagueness of this post ;-)
Another membership type question!
Hi Folks,
I'm trying to hide something that has a NULL result within a members area:
If there is no output detected for CP Health Board Committee, id like this whole block hidden. Could someone point me in the right direction. Apologies for the vagueness of this post ;-)
Thanks Darren
Is it possible to add a member group to this statement - I've googled it but I don't think it's possible?
@if (Members.IsLoggedIn() && profileModel != null)
So if members of group A logs in it runs this statment.
Sorry my knowledge is a bit limited here.
Thanks for helping oot!
Darren
In fact this is what I'm trying to achieve:
if member group = groupa then display these custom member types
if member group = groupb then display these custom member types
is working on a reply...