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
I have a very basic scenario. A node(project) has children(photo). On the node's template I'm looping over the children and displaying each photo. I'm going to break out the parts to make it simple:
var photos = Model.Children; ... @foreach (var photo in photos){ caption = photo.projectImageCaption; caption = caption.Length>66 ? caption.Substring(0,63)+"..." : caption; <li> <a title="@photo.projectImageCaption" rel="gallery2" href="http://mce_host/forum/developers/razor/@photo.projectImage"><img src="http://mce_host/[email protected]&Class=ProjectDetailThumb" alt="@caption" /></a> <div class="title"> <a href="#">@caption</a> </div> </li> }
Could you spit out the id of each of the nodes on the page, it might be easier to see where that node has come from.
Perhaps you could try this instead of:
Model.Children;
Use
Model.Pictures (where 'Pictures' is the alias of the nodes you want to display - more details here
http://umbraco.com/follow-us/blog-archive/2011/2/23/umbraco-47-razor-feature-walkthrough-%E2%80%93-part-1)
Finally this could just be a weird caching problem have you tried republishing the entire site? Failing that the old IIS reset?
If that doesn't work then it must be looking at the physical files on the server in the directory, but that just sounds nonsense.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Displaying more Children than Exist
I have a very basic scenario. A node(project) has children(photo). On the node's template I'm looping over the children and displaying each photo. I'm going to break out the parts to make it simple:
Could you spit out the id of each of the nodes on the page, it might be easier to see where that node has come from.
Perhaps you could try this instead of:
Model.Children;
Use
Model.Pictures (where 'Pictures' is the alias of the nodes you want to display - more details here
http://umbraco.com/follow-us/blog-archive/2011/2/23/umbraco-47-razor-feature-walkthrough-%E2%80%93-part-1)
Finally this could just be a weird caching problem have you tried republishing the entire site? Failing that the old IIS reset?
If that doesn't work then it must be looking at the physical files on the server in the directory, but that just sounds nonsense.
is working on a reply...