Copied to clipboard

Flag this post as spam?

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


  • blackdog 53 posts 24 karma points
    Mar 09, 2009 @ 10:19
    blackdog
    0

    How to print a mediapicker value [Solved]

    Hi to all,

    i'm studying umbraco a lot of time... I understand the basic of xslt and properties.
    I'm building a table in which print the value of an attached file... But if use the upload type of the property i can see and download file. If i, instead, use media picker type of properties i can oly see the id (i.e. 1393) but if click on the link i can't see nothing. I've tried to insert an if cylce recalling media library but nothing.... Help

    Bye









  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Mar 09, 2009 @ 10:40
    Ismail Mayat
    0

    blackdog,

    The only thing i can see in code that might be the issue is where you are doing

    [code]
    umbraco.library:GetMedia(data[@alias='mpicker']
    [/code]

    are you in a loop? If you are then this should work if you are not then the code needs to be

    [code]
    umbraco.library:GetMedia($currentPage/data[@alias='mpicker']
    [/code]

    or if you are passing a node into the macro that has the mpicker property you would replace currentPage with name of that variable. Basically you need to confirm the node context.

    Regards

    Ismail

  • blackdog 53 posts 24 karma points
    Mar 09, 2009 @ 11:41
    blackdog
    0

    Yeah i'm in a loop!

    But don't works i don't understand.

    I'll try to execute this code but i have an error System.OverflowException: Value was either too large or too small for an Int32.






  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Mar 09, 2009 @ 11:43
    Ismail Mayat
    0

    blackdog,

    try changing the false to 'true' see if that works. Also are what version of umbaco are you using?

    Regards

    Ismail

  • blackdog 53 posts 24 karma points
    Mar 09, 2009 @ 11:48
    blackdog
    0

    Thanks for you patience!

    I tried to change to true but nothing. I use umbraco 4...

  • blackdog 53 posts 24 karma points
    Mar 09, 2009 @ 15:11
    blackdog
    0

    I don't understand. How is it possbile that i have the erro int32. I think the syntax is correct...

    Thanks

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Mar 09, 2009 @ 16:27
    Ismail Mayat
    0

    Blackdog,

    I had a similar issue last week here is my code :

    [code]











  • [/code]

    See if the above helps.

    Ismail

Copy Link
  • blackdog 53 posts 24 karma points
    Mar 09, 2009 @ 17:09
    blackdog
    0

    You are great!!!!

    It works very well now!!!

    I have an answer for you...

    Why now it works? Why do you insert a variable?



    Anyway thanks very much!

    Copy Link
  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Mar 09, 2009 @ 18:26
    Ismail Mayat
    0

    blackdog,

    im not sure its the variable but it may be the number() bit. I generally use variable because on many occassions i need other properties from the object so rather than making getmedia calls each time (one call is one call to database) i do it once and use the variable.

    Regards

    Ismail

    Copy Link
  • Please Sign in or register to post replies

    Write your reply to:

    Draft