Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lotus 22 posts 20 karma points
    Apr 08, 2009 @ 20:09
    Lotus
    0

    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?

  • Tommy Poulsen 514 posts 708 karma points
    Apr 08, 2009 @ 20:30
    Tommy Poulsen
    0

    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).

    Tommy

  • Lotus 22 posts 20 karma points
    Apr 08, 2009 @ 20:43
    Lotus
    0

    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.

  • Tommy Poulsen 514 posts 708 karma points
    Apr 08, 2009 @ 20:54
    Tommy Poulsen
    0

    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.

    Tommy

  • Lotus 22 posts 20 karma points
    Apr 08, 2009 @ 21:14
    Lotus
    0

    when putting outside the for-each the text inside the

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Apr 08, 2009 @ 21:34
    Dirk De Grave
    0

    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

  • Lotus 22 posts 20 karma points
    Apr 08, 2009 @ 22:15
    Lotus
    0

    Nope, no output.

    Template code..
    [code][/code]

    Is this wrong maybe?
    [code]select="umbraco.library:GetXmlNodeById($source)/node"[/code]

  • Daniel Lindstrom 454 posts 271 karma points
    Apr 08, 2009 @ 22:17
    Daniel Lindstrom
    0

    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!

  • Daniel Lindstrom 454 posts 271 karma points
    Apr 08, 2009 @ 22:18
    Daniel Lindstrom
    0

    [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'?

  • Lotus 22 posts 20 karma points
    Apr 08, 2009 @ 22:31
    Lotus
    0

    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>

  • Lotus 22 posts 20 karma points
    Apr 08, 2009 @ 22:53
    Lotus
    0

    [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 daniel
    l. I was wondering how to debug my code the best way..

Please Sign in or register to post replies

Write your reply to:

Draft