Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Currently I'm struggling to check if a documenttype (member) has a 'damp' image property:
@{
var membersToList = @Model.Children.Where("Visible");
<table>
@foreach (var memberGroup in membersToList.InGroupsOf(3))
{
<tr>
@foreach (dynamic member in memberGroup)
<td style="padding:10px;">
if(member.HasValue("memberImage"))
var image = member.memberImage.mediaItem.MemberImage.umbracoFile;
}
@if (image != null)
<img src="/imageGen.ashx?image=@image&width=150" style="margin-bottom:10px;"/><br />
else
<img src="/imageGen.ashx?image=/media/1591/mystery-person.jpg&width=150" style="margin-bottom:10px;"/><br />
@(member.memberFirstName + " " + member.memberLastName)
</td>
</tr>
</table>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
how to check if documenttype has 'damp' image property
Hi,
Currently I'm struggling to check if a documenttype (member) has a 'damp' image property:
@{
var membersToList = @Model.Children.Where("Visible");
<table>
@foreach (var memberGroup in membersToList.InGroupsOf(3))
{
<tr>
@foreach (dynamic member in memberGroup)
{
<td style="padding:10px;">
@{
if(member.HasValue("memberImage"))
{
var image = member.memberImage.mediaItem.MemberImage.umbracoFile;
}
}
@if (image != null)
{
<img src="/imageGen.ashx?image=@image&width=150" style="margin-bottom:10px;"/><br />
}
else
{
<img src="/imageGen.ashx?image=/media/1591/mystery-person.jpg&width=150" style="margin-bottom:10px;"/><br />
}
@(member.memberFirstName + " " + member.memberLastName)
</td>
}
</tr>
}
</table>
}
is working on a reply...