Error loading Razor Script uBlogsyListComments.cshtml d:\ShareRoot\Websites\Mosaic v2\macroScripts\uBlogsyListComments.cshtml(27): error CS1061: 'System.Collections.Generic.IEnumerable' does not contain a definition for 'OrderbyDescending' and no extension method 'OrderbyDescending' accepting a first argument of type 'System.Collections.Generic.IEnumerable' could be found (are you missing a using directive or an assembly reference?)
I need to mod both the latest posts and latest comments fields in the right hand collumn with the SMALL Param (1)
Many thanks.,
PS. Great package and easy to skin. Thank you for creating.
Error loading Razor Script uBlogsyListComments.cshtml d:\ShareRoot\Websites\Mosaic v2\macroScripts\uBlogsyListComments.cshtml(26): error CS1061: 'System.Collections.Generic.IEnumerable' does not contain a definition for 'OrderbyDescending' and no extension method 'OrderbyDescending' accepting a first argument of type 'System.Collections.Generic.IEnumerable' could be found (are you missing a using directive or an assembly reference?)
Also as a side issue I would like to access the list posts macro in my home page.The blog site is not a subordinate of the main site though. What mods (or new script) would I need to make to get it working?
Latest comments sort order?
Hello!
How do I get the latest comments to sort with the newest first by CreateDate on the comment node?
//Kalle
nodes = nodes.OrderbyDescending(x => x.CreateDate)
Hello,
I get an Razor error when I do this. Its only on the right panel I want to do this.
//Kalle
What tyoe of error?
Try breaking it up into 3 lines
Sorry this didn't work for me. I get
Error loading Razor Script uBlogsyListComments.cshtml
d:\ShareRoot\Websites\Mosaic v2\macroScripts\uBlogsyListComments.cshtml(27): error CS1061: 'System.Collections.Generic.IEnumerable' does not contain a definition for 'OrderbyDescending' and no extension method 'OrderbyDescending' accepting a first argument of type 'System.Collections.Generic.IEnumerable' could be found (are you missing a using directive or an assembly reference?)
I need to mod both the latest posts and latest comments fields in the right hand collumn with the SMALL Param (1)
Many thanks.,
PS. Great package and easy to skin. Thank you for creating.
I cant seem to replicate this issue.
Can you paste your code here?
That's odd.
Actually its your code from the starter kit. I haven't modded it...from uBlogsyListComments.cshtml.
The mod you suggested:
nodes =NodeHelper.GetComments(Model.Id);
nodes = nodes.OrderbyDescending(x => x.CreateDate);
nodes =nodes.Take(count);
to replace
nodes = ((IEnumerable<DynamicNode>)NodeHelper.GetComments(Model.Id)).Take(count);
...in your script gives me
Error loading Razor Script uBlogsyListComments.cshtml
d:\ShareRoot\Websites\Mosaic v2\macroScripts\uBlogsyListComments.cshtml(26): error CS1061: 'System.Collections.Generic.IEnumerable' does not contain a definition for 'OrderbyDescending' and no extension method 'OrderbyDescending' accepting a first argument of type 'System.Collections.Generic.IEnumerable' could be found (are you missing a using directive or an assembly reference?)
Also as a side issue I would like to access the list posts macro in my home page.The blog site is not a subordinate of the main site though. What mods (or new script) would I need to make to get it working?
I appreciate your time Anthony.
I think this is your issue...
OrderbyDescending should be OrderByDescending
note the capital B
Regarding your home page...
Change this line
// get all posts
IEnumerable<DynamicNode> postList = uBlogsy.Web.Helpers.NodeHelper.GetPosts(Model.Id)
Replace the Model.Id with the id of the ublogsy landing node.
Thank you that did it.
I cut 'n pasted and didn't check.
is working on a reply...