I have a usercontrol where i create a menu out from a root node. But nodeChild.NiceUrl dont get filled out before i print it out. Very strange! However if im in debug mode and let the thread sleep abit before i get to NiceUrl the webcontrol gets the attribute filled out ?
Also name etc. comes out fine its just niceUrl , that doesent come out unless i debug and in debug wait a few seconds before continueing on in the steps that i can see that nodeChild.NiceUrl actually has a url else its just empty :S
the problem didnt have anything todo with publish :S
The problem keeps beeing an issue if i call node.NIceURL as the first thing i do with the node in my foreach loop if i call Name first problem dispares :S
Node.NIceUrl (slow?)
I have a usercontrol where i create a menu out from a root node. But nodeChild.NiceUrl dont get filled out before i print it out. Very strange! However if im in debug mode and let the thread sleep abit before i get to NiceUrl the webcontrol gets the attribute filled out ?
Also triede moving to hole code snippet to protected override void CreateChildControls() with same result.
This is a very strange issue to me :S
Also name etc. comes out fine its just niceUrl , that doesent come out unless i debug and in debug wait a few seconds before continueing on in the steps that i can see that nodeChild.NiceUrl actually has a url else its just empty :S
Oka finally figured it out, seems like theres a bug, u must call or interact somehow with the node before using the attribute niceurl.
The node always exits, but can be empty if it's not published yet. If it's not published yet you can get the properties by using the Document object.
You can also try to get the NiceUrl by using the following code:
umbraco.library.NiceUrl(ToolbarRootID)
the problem didnt have anything todo with publish :S
The problem keeps beeing an issue if i call node.NIceURL as the first thing i do with the node in my foreach loop if i call Name first problem dispares :S
Hmm sorry cant help you with that. Never had this problem before. Did you make a workitem of it at codeplex? You can add it here.
is working on a reply...