Well it's very simple. DynamicXml doesn't support skip or take. Maybe this will be added to 4.7.2, but for now it's best if you convert the xml to an XElement and do paging on that.
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. It also has paging in it with Skip and Take :-).
DAMP - Paging error (umbraco.MacroEngines.DynamicXml contains no definition for Skip)
Hello,
i use the DAMP advanced Media Picker and it's works very good without paging. But if I will integrate a paging then I see the following error:
Error loading Razor Script ListGalerie.cshtml
umbraco.MacroEngines.DynamicXml contains no definition for Skip.
I debug the script, but i can't found the error. This is my code:
Have anyone a idea?
Umbracoversion: 4.7.1 - asp.net 4.0
Sören
Well it's very simple. DynamicXml doesn't support skip or take. Maybe this will be added to 4.7.2, but for now it's best if you convert the xml to an XElement and do paging on that.
Jeroen
Thank you!
You could also try the DAMP RazorDataTypeModel. You could change the code so it returns a List of media items. Than in your Razor code you can use Skip and Take on that list. Here is more info about Razor DataType Models: http://umbraco.com/follow-us/blog-archive/2011/9/18/umbraco-razor-feature-walkthrough%E2%80%93part-7.aspx.
Jeroen
I created my own DAMP Razor Model you can use: http://our.umbraco.org/projects/backoffice-extensions/damp-razor-model. It also supports Skip and Take for paging :-).
Jeroen
Hi Jeroen,
thank you! Great works! I'll try it in the coming days.
Sören
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. It also has paging in it with Skip and Take :-).
Jeroen
is working on a reply...