@{ //Check the currentpage has a value in the property 'arrangementImageSlider' if (Model.HasValue("arrangementImageSlider")) { <div class="flexslider-container"> <div class="flexslider"> <ul class="slides"> @foreach (dynamic photo in Model.arrangementImageSlider) { <li> <img src="@DAMP_Helper.GetImageCropperUrl(photo, "lunchCrop")" alt="@photo.arrangementImageSlider.nodeName"/> <p class="flex-caption">@photo.arrangementImageSlider.nodeName</p> </li> } </ul> </div> </div> } }
However instead of the images rendered in my slider, I get this Razor error message:
Error loading Razor Script ImageSlider.cshtml 'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'arrangementImageSlider'
Does anyone have an idea what the problem could be?
"arrangementImageSlider" is a property defined for my "Arrangement" document type. This property uses a the custom datatype 'ImagesLunchPakket' which in turn implements the Digibiz Advanced Media Picker.
yes! Found the error. The problem is that I had to speficy the mediatype (SliderImage) to get the nodeName property, instead of the propertyname of the documenttype, so this is the correct code:
@{ //Check the currentpage has a value in the property 'arrangementImageSlider' if (Model.HasValue("arrangementImageSlider")) { <div class="flexslider-container"> <div class="flexslider"> <ul class="slides"> @foreach (dynamic photo in Model.arrangementImageSlider) { <li> <img src="@DAMP_Helper.GetImageCropperUrl(photo, "lunchCrop")" alt="@photo.SliderImage.nodeName"/> <p class="flex-caption">@photo.SliderImage.nodeName</p> </li> } </ul> </div> </div> } }
'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'arrangementImageSlider'
Hi,
I have installed the Digibiz Advanced Media Picker and the DAMP Samples package.
Following the sample code, I have implemented the Digibiz Advanced Media Picker type to show image crops in a slider (Flex Slider):
@inherits umbraco.MacroEngines.DynamicNodeContext
@using DigibizAdvancedMediaPicker;
@{
//Check the currentpage has a value in the property 'arrangementImageSlider'
if (Model.HasValue("arrangementImageSlider"))
{
<div class="flexslider-container">
<div class="flexslider">
<ul class="slides">
@foreach (dynamic photo in Model.arrangementImageSlider)
{
<li>
<img src="@DAMP_Helper.GetImageCropperUrl(photo, "lunchCrop")" alt="@photo.arrangementImageSlider.nodeName"/>
<p class="flex-caption">@photo.arrangementImageSlider.nodeName</p>
</li>
}
</ul>
</div>
</div>
}
}
However instead of the images rendered in my slider, I get this Razor error message:
Error loading Razor Script ImageSlider.cshtml
'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'arrangementImageSlider'
Does anyone have an idea what the problem could be?
"arrangementImageSlider" is a property defined for my "Arrangement" document type. This property uses a the custom datatype 'ImagesLunchPakket' which in turn implements the Digibiz Advanced Media Picker.
Thanks for your help,
Anthony
yes! Found the error. The problem is that I had to speficy the mediatype (SliderImage) to get the nodeName property, instead of the propertyname of the documenttype, so this is the correct code:
@inherits umbraco.MacroEngines.DynamicNodeContext
@using DigibizAdvancedMediaPicker;
@{
//Check the currentpage has a value in the property 'arrangementImageSlider'
if (Model.HasValue("arrangementImageSlider"))
{
<div class="flexslider-container">
<div class="flexslider">
<ul class="slides">
@foreach (dynamic photo in Model.arrangementImageSlider)
{
<li>
<img src="@DAMP_Helper.GetImageCropperUrl(photo, "lunchCrop")" alt="@photo.SliderImage.nodeName"/>
<p class="flex-caption">@photo.SliderImage.nodeName</p>
</li>
}
</ul>
</div>
</div>
}
}
Greetings,
Anthony
is working on a reply...
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.