So the thing is like this: In my magazine I have two nodes which contains more than one topic. So when I display the Archive pages I distinguish between them by check their checkbox and then I display just nodes from the selected topic. The problem is that I'm get kind of "Holes" because if for example the pagination variable declare to show 20 posts on each page, now if the first 13 items are from topic 1, then there are another 24 items of topic 2 so the second page will be empty.
So, I got advise to simply build a new node which contain just the selected topic and show it like I show the other nodes which contain just one topic and there isn't any problem with them.
So, this the way I create the Node using the "Where" sentence - however, I get just errors...
if (Category_item == "Gadgets") //Select the requested topic to build to new node
{
// pagesToList will be the new node
// magazine_node - is the node that contains few topics and I want to sort it - // mean - to build a new node (pagesToList) which contain just the selected items - //in this case topics about gadgets
Try to sort Node - get error - HELP!!! Thx :)
So the thing is like this: In my magazine I have two nodes which contains more than one topic. So when I display the Archive pages I distinguish between them by check their checkbox and then I display just nodes from the selected topic. The problem is that I'm get kind of "Holes" because if for example the pagination variable declare to show 20 posts on each page, now if the first 13 items are from topic 1, then there are another 24 items of topic 2 so the second page will be empty.
So, I got advise to simply build a new node which contain just the selected topic and show it like I show the other nodes which contain just one topic and there isn't any problem with them.
So, this the way I create the Node using the "Where" sentence - however, I get just errors...
pagesToList = magazine_node.DescendantsOrSelf.Where(Model.GetProperty("opliCategory").Value.ToString() == "Gadgets"); }
What I'm doing wrong?
I know that the error / problem is somewhere after the "pagesToList = magazine_node.DescendantsOrSelf" - Here.
Because if I just left it like this - pagesToList = magazine_node.DescendantsOrSelf - there is no error But there isn't sort effect also ...
HELLLLLLLLLLLLLLLLP!!
Thanks :)
If you are using the "old" razor this blog might help: http://umbraco.com/follow-us/blog-archive/2011/3/1/umbraco-razor-feature-walkthrough-%E2%80%93-part-4
The where statement should always be a string with the old razor.
Jeroen
So, if I understand your answer maybe I'm use the old Razor? (I'm using v6.0.5)
And if yes - so the way to solve it is to use the \" \" ? (this what I understand from the link)
So, I tried this
Still not work ...
Any other idea pls ... ?
Thanks.
Anybody ... ?
Other way to do it?
Maybe with foreach loop and add ?
Thanks
is working on a reply...