//check the currentpage has a value in the property 'photos'
if (Model.HasValue("photos"))
{
var MediaFloder = Library.MediaById(Model.photos);
<div class="flexslider-container">
<div class="flexsliders">
<ul class="slides">
@foreach (var photo in MediiaFolder.Children)
{
<li>
<img src="@photo.umbracoFile"alt="@photo.Name" />
I have just take a look on your code and I have spotted what I think gives you the error. You have some misspelling the name of your media folder variable and the place where you are called it.(Look at the var = MediaFloder andvar photo inMediiaFolder.Children)
I just want tomake surethat you know thatUmbraco7 comes withMVCset asdefault rendering engine. The documentation can be found here.
You can change your Umbraco installation to use Webforms, by change the value in the <defaultRenderingEngine>Mvc</defaultRenderingEngine> from Mvc to WebForms
Error loading MacroEngine script (file: DisplayPhotos.cshtml)
Hi,
i am trying to display images in my gallery.i am getting an error as:
Galleries
Error loading MacroEngine script (file: DisplayPhotos.cshtml)
@{
@photo.Name
} } }
Hi chaitanya,
I have just take a look on your code and I have spotted what I think gives you the error. You have some misspelling the name of your media folder variable and the place where you are called it.(Look at the var = MediaFloder and
var photo inMediiaFolder.Children
)Try this instead.
I just want to make sure that you know that Umbraco 7 comes with MVC set as default rendering engine. The documentation can be found here.
You can change your Umbraco installation to use Webforms, by change the value in the
<defaultRenderingEngine>Mvc</defaultRenderingEngine>
from Mvc to WebFormsHope this helps you.
/Dennis
Hi chaitanya,
Did you managed to solve your issue with the photo gallery, or did you have time to give my suggestion a try.
/Dennis
image not displaying...
is working on a reply...