List one pictures of every childnode on a page chosen with contentpicker
I hope i found the right place to post this, i am sure its rateher trivial..
I try to list one pictures of every childnode on a page by choosing a root node with contentpicker.
As you can see the datafield is named "pamaArtistSmallPic".
Rigt now it doesnt do anything, not even say error reading or error parsing.
I have not investigated your code in details, but apparently it looks perfectly ok.
Have you validated that you enter the template at all - and that you have any iterations in your for loop (try by adding some dummy output chars).
The macro is installed in the template and I got chose a root node. Putting inside the for-each didnt do anything. i guess its something fundametally wrong =). I have made like only 5 scripts but not once has there been "zero" output..is that a sign that the syntax is right but just dont find any content to extract.
Did you try writing some output outside the for-each loop just to make sure the template is invoked at all. I expect you did assign the template to a content node.
In such cases, I tend to simplify as much as possible to find the cause. In your case, start with:
[code]
[/code]
Are you getting some output now...
If so, add the umbracoNaviHide constraint, and test again. And continue until you've spotted the problem. If not, the problem is in the select of the for loop.
Also, make sure the subnodes are published! And it might be a good idea to print out outside the loop, and compare it with the id you can see when hovering over the node in the content tree in the admin, just to make sure it holds the correct value.
Yes, I have made a spelling mistake to the macro parameter. The alias was named "cource" but the name was "source". So when inserting the macro in the template it wrote out the alias and the reference became wrong in the XSLT.
You learn something new everyday, thank you all..the script prints the images perfectly =d>
[quote=daniell]Also, make sure the subnodes are published! And it might be a good idea to print out outside the loop, and compare it with the id you can see when hovering over the node in the content tree in the admin, just to make sure it holds the correct value.
Good luck![/quote]
BTW, It sounds like a good thing to do, thanx daniell. I was wondering how to debug my code the best way..
List one pictures of every childnode on a page chosen with contentpicker
I hope i found the right place to post this, i am sure its rateher trivial..
I try to list one pictures of every childnode on a page by choosing a root node with contentpicker.
As you can see the datafield is named "pamaArtistSmallPic".
Rigt now it doesnt do anything, not even say error reading or error parsing.
[code]
[/code]
How do I go about this?
I have not investigated your code in details, but apparently it looks perfectly ok.
Have you validated that you enter the template at all - and that you have any iterations in your for loop (try by adding some dummy output chars).
Thanx for your reply.
The macro is installed in the template and I got chose a root node. Putting inside the for-each didnt do anything. i guess its something fundametally wrong =). I have made like only 5 scripts but not once has there been "zero" output..is that a sign that the syntax is right but just dont find any content to extract.
Did you try writing some output outside the for-each loop just to make sure the template is invoked at all. I expect you did assign the template to a content node.
when putting outside the for-each the text inside the
Hi,
In such cases, I tend to simplify as much as possible to find the cause. In your case, start with:
[code]
[/code]
Are you getting some output now...
If so, add the umbracoNaviHide constraint, and test again. And continue until you've spotted the problem. If not, the problem is in the select of the for loop.
Regards,
/Drik
Nope, no output.
Template code..
[code][/code]
Is this wrong maybe?
[code]select="umbraco.library:GetXmlNodeById($source)/node"[/code]
Also, make sure the subnodes are published! And it might be a good idea to print out outside the loop, and compare it with the id you can see when hovering over the node in the content tree in the admin, just to make sure it holds the correct value.
Good luck!
[quote=Lotus]Nope, no output.
Template code..
[code][/code]
Is this wrong maybe?
[code]select="umbraco.library:GetXmlNodeById($source)/node"[/code]
[/quote]
'cource', shouldn't it be 'source'?
Yes, I have made a spelling mistake to the macro parameter. The alias was named "cource" but the name was "source". So when inserting the macro in the template it wrote out the alias and the reference became wrong in the XSLT.
You learn something new everyday, thank you all..the script prints the images perfectly =d>
[quote=daniell]Also, make sure the subnodes are published! And it might be a good idea to print out outside the loop, and compare it with the id you can see when hovering over the node in the content tree in the admin, just to make sure it holds the correct value.
Good luck![/quote]
BTW, It sounds like a good thing to do, thanx daniell. I was wondering how to debug my code the best way..
is working on a reply...