Im currently struggeling with this problem.
I have created a artical document type. In this document type i have created an custom data type named Employee picker which displays all the employees in a dropdown. The employee’s are created by an employee document type and are located in a employee folder.
I want to create a dropdown on my masterpage because i want to create a search so i can return all the articals by the selected author.
Now to the problem. When i loop through my authors i only return there ID and i'm getting a lot of emtey spaces.
@if(Model != null)
{
var employee = Library.NodeById(Model.author);
var node = Library.NodeById(1069);
Displaying correct values in dropdown list
Im currently struggeling with this problem. I have created a artical document type. In this document type i have created an custom data type named Employee picker which displays all the employees in a dropdown. The employee’s are created by an employee document type and are located in a employee folder. I want to create a dropdown on my masterpage because i want to create a search so i can return all the articals by the selected author.
Now to the problem. When i loop through my authors i only return there ID and i'm getting a lot of emtey spaces.
@if(Model != null) { var employee = Library.NodeById(Model.author); var node = Library.NodeById(1069);
}
Hello,
What version of Umbraco are you using? Your still using a very old version of Razor and there are better ways of doing this: http://our.umbraco.org/forum/developers/razor/44664-Confused-over-when-DynamicNodeList-is-returned?p=0#comment160678
It might be easier to do with the new code.
Jeroen
My web.Config says 6.1.6
Ok that means you can also use IPublishedContent by creating a Partial View Macro. I recommend to do that.
Jeroen
Thank you
is working on a reply...