If you add umbDebugShowTrace=true to your querystring, you'll definitely see the order in which the macro's are rendered. My guess is that the mark-up is causing you to see weird ordering. I've seen sort-of the same behaviour if you have accidental self-closing tags in your XSLT. So for example if you have something like this:
It is very well possible that the nodeset is empy or your alias is not filled. This will result in either a <ul/> or a <li/> in your output. This causes rendering to fail as it HAS to be something like <ul>something</ul> or <li>something</li>.
What I do in for-each loops is always first do a count > 0 before I start outputting thing:
You got me thinking on the right tracks, turns out my XSLT was being too clever and messing with the tags, and my .NET user control had missed a tag off, I went to looking at the source code of the page, rather than the DOM tools, and noticed where things were going wrong, instead of calling 2 XSLT macro's and a .NET usercontrol, I have brought the simple functionality of the two XSLT macros inside the .NET usercontrol, and everything is rendering properly again.
XSLT Macros rendering before .NET Usercontrols
Hi,
I have a strange error, I've got a page, with many XSLT macros, and also a .NET usercontrol macro.
In my page, I wish to have
But the order is coming through more like
Above is an example of the template markup, now strangley the .NET macro is coming through before "XSLT5" and after <div2>
I'm not sure what's going on quite, this is an umbraco 4.0.3 instance, (I've changed the macro names to try and explain better what's happening)
My .NET user control renders on the "onRender" function a HTML table...
Has anybody seen this before?
If you add umbDebugShowTrace=true to your querystring, you'll definitely see the order in which the macro's are rendered. My guess is that the mark-up is causing you to see weird ordering. I've seen sort-of the same behaviour if you have accidental self-closing tags in your XSLT. So for example if you have something like this:
It is very well possible that the nodeset is empy or your alias is not filled. This will result in either a <ul/> or a <li/> in your output. This causes rendering to fail as it HAS to be something like <ul>something</ul> or <li>something</li>.
What I do in for-each loops is always first do a count > 0 before I start outputting thing:
Hi Sebastiaan,
You got me thinking on the right tracks, turns out my XSLT was being too clever and messing with the tags, and my .NET user control had missed a tag off, I went to looking at the source code of the page, rather than the DOM tools, and noticed where things were going wrong, instead of calling 2 XSLT macro's and a .NET usercontrol, I have brought the simple functionality of the two XSLT macros inside the .NET usercontrol, and everything is rendering properly again.
Cheers!
Ian.
is working on a reply...