Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Mjellow guys!
I'm trying to make a gallery frontpage with 3 functions:
See code here: http://pastebin.com/nHsqbAxR And here's a demonstration which, hopefully can help you understand what I wish to accomplish:
http://pastebin.com/nHsqbAxR
I hope this is sufficient informations, otherwise let me know and thank you for reading this! :o)
Hi Mike,
I believe you can just use a .Where() when you count the number of items. So on line 13 in your example, use something like this…
var countSubpages = item.Children.Where("fileUploadAlias != null").Count();
Hope this helps?
David.
Hey David,
Thank you for your response! The value returned from the above code is the same as the number of children.
I tried writing the code like this:
var projectFiles = category.Children.Where("projectFiles" != null).Count();
but this returns the Children count aswell.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Count children childrens hasproperty
Mjellow guys!
I'm trying to make a gallery frontpage with 3 functions:
See code here:
http://pastebin.com/nHsqbAxR
And here's a demonstration which, hopefully can help you understand what I wish to accomplish:I hope this is sufficient informations, otherwise let me know and thank you for reading this! :o)
Hi Mike,
I believe you can just use a .Where() when you count the number of items. So on line 13 in your example, use something like this…
Hope this helps?
David.
Hey David,
Thank you for your response! The value returned from the above code is the same as the number of children.
I tried writing the code like this:
but this returns the Children count aswell.
is working on a reply...