I have try to reinstall it but ran into the same problem.I have change the defaultRenderingEngine to Mvc alady but it still will not work!... any ideas how i can fix it?
It may not like that as its a line of code just on its own. I've had to put things like that in a html span or use the @: notation to show you are rendering out.
Preview Error
HI,
Every time i ry to prewiw my it using this template a keep getting
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage @{ Layout = "SW_Master.cshtml"; }
@{ var nodeIds = Model.Content.GetPropertyValue("slideshow").ToString().Split(','); List slides = new List(); foreach (var nodeId in nodeIds) { if (!String.IsNullOrEmpty(nodeId)) { var publishedContent = Umbraco.NiceUrl(Convert.ToInt32(nodeId)); if (!String.IsNullOrEmpty(publishedContent) && publishedContent != "#") { slides.Add(Umbraco.TypedContent(nodeId)); } } } } @foreach (var slide in slides) { if(slide != null) { string styleString = !slide.IsFirst() ? "display:none;" : "";-
@Html.Raw(@slide.GetPropertyValue("bodyText").ToString())
} }
@foreach (var slide in slides) { string classString = slide.IsFirst() ? "selected" : "";- @slide.Position()
}
Hi Paul
What version of Umbraco are you seeing this on?
/Jan
HI Paul,
I think you've forgotten to set the defaultRenderingEngine to Mvc
Hi,
I have the same problem. Does anyone solved the issue. - defaultRenderingEngine to Mvc is already set ;-)
cheers!
I think its a coding issue thats stopping the view compiling.
I've just bashed it into a view and it wasnt compiling for me.
Made a couple of changes and it now compiles.
First thing was moving the @{ inheritis off the first line and then also making the list a generic list.
Paste this in and see if it fixes it.
It may not like that as its a line of code just on its own. I've had to put things like that in a html span or use the @: notation to show you are rendering out.
is working on a reply...