Ok. I've recently discovered this package and it's freaking amazing. However, I'm a complete newb. I'm really struggling(for hours) to figuring out how to work with DAMP and 4.11 MVC views.
Model.Content.GetPropertyValue("dampNewWide");
and
Model.Content.GetProperty("dampNewWide").Value;
Are returning different things. The first returns an object that I can't seem to perform anything actions on. The second returns a string of the XML. From the 4.10 documention, I would expect both to return the same thing.
I can't iterate over either one.
CurrentPage.dampNewWide;
Returns something similar to the first mentioned, except I can iterate over it.
foreach(var d in CurrentPage.dampNewWide){ var x = d.ImageWide.umbracoFile; @x; //spits out path to image }
So: Why can't I perform any actions to the value returned by Model.Content?
Can anyone provide some more insight these things in general?
It would be fantastic if there were some best practice examples for MVC views in the DAMP Samples package.
Any help would be greatly appreciated. I'm working on my first real Umbraco site.
I've released the DAMP gallery. It's a website which shows how DAMP can be used in 4.11 MVC for an image and video gallery. The complete source code is available so you can see exactly how things are working.
I have tried to reduplicate your Damp Gallery on V4.11.8 and V6.05 with the same result. A 404 error on video and a problem with paging on Gallery1. Any ideas Link incuded below.
DAMP with MVC views in 4.11
Ok. I've recently discovered this package and it's freaking amazing. However, I'm a complete newb. I'm really struggling(for hours) to figuring out how to work with DAMP and 4.11 MVC views.
and
Are returning different things. The first returns an object that I can't seem to perform anything actions on. The second returns a string of the XML. From the 4.10 documention, I would expect both to return the same thing.
I can't iterate over either one.
Returns something similar to the first mentioned, except I can iterate over it.
So:
Why can't I perform any actions to the value returned by Model.Content?
Can anyone provide some more insight these things in general?
It would be fantastic if there were some best practice examples for MVC views in the DAMP Samples package.
Any help would be greatly appreciated. I'm working on my first real Umbraco site.
If you want to use DAMP in 4.11 MVC it's better to use the DAMP Property Editor Value Converter. You can watch a demo here: http://www.screenr.com/g2H7
Jeroen
Hmm I didn't know about that package Jeroen, I will give it a try as well.
Since I wasn't sure about the exact Razor syntax either I had been using Linq 2 XML to fetch the image paths.
Hello,
I've released the DAMP gallery. It's a website which shows how DAMP can be used in 4.11 MVC for an image and video gallery. The complete source code is available so you can see exactly how things are working.
Jeroen
Awesome. Thanks @Jeroen
I wish @Jeroen you had an example without paging
It's pretty simple. In the example it says this:
Just remove the skip an take part to get all the images:
Jeroen
I just want to get a crop to work in 4,11. it is Krazy how it worked before but not in MVC except in your examples. Sorry but it is frustrating.
I have a department image and I just want to list with a
//Get the images selected with DAMP. dynamic departmentImage = CurrentPage.Children.imageDepartment; if (departmentImage.Count > 0) {
@foreach (dynamic d in departmentImage) {- @*If the crop is clicked display the original image.*@ @*Show the gallery crop.*@
}
}}
Jeroen
I have tried to reduplicate your Damp Gallery on V4.11.8 and V6.05 with the same result. A 404 error on video and a problem with paging on Gallery1. Any ideas Link incuded below.
http://htiek.com/youtube-gallery.aspx
Thanks
Keith Hubbard
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.