Copied to clipboard

Flag this post as spam?

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


  • Laurence Gillian 600 posts 1219 karma points
    Feb 18, 2011 @ 16:10
    Laurence Gillian
    1

    The Mystic Label

    Hello!

    So in Umbraco there is a datatype called Label, which is used on the media items to say get the file size, width, height.

    But... what else can it do? I'm aware of;

    umbracoBytes, umbracoExtension, umbracoWidth, umbracoHeight, 

    But what else is hiding there? 

    Hope everyone had a lovely week, Laurie x

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Feb 18, 2011 @ 16:19
    Hendy Racher
    0

    Interesting question !

    I'm guessing this behaviour is within the associated datatypes, so would all the above be set (if they exist) by the file upload datatype ?

     

  • Chris Koiak 700 posts 2626 karma points
    Feb 18, 2011 @ 16:38
    Chris Koiak
    0

    This is a feature of the Upload datatype.

    The label datatype just happens to be used for output purposes, it would work for a textbox just as well.

    I pretty sure it only tries to set those 4 properties.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 18, 2011 @ 20:57
    Kim Andersen
    2

    Hi there.

    We have used the Label data type, in an e-commerce project of ours. We made an integration with an ERP system, where the products where stored. But in the Umbraco back office you could find all the products. When selecting a product, some of the basic, unique information of that product where displayed through a label data type. Eg. the product ID where displayed as a label, as this should not ever be changed, but it should still be vissible to the user.

    /Kim A

  • Johan Plesner Hamann 105 posts 199 karma points
    Mar 27, 2011 @ 19:22
    Johan Plesner Hamann
    0

    Hi

    So how do I do that Kim have described? what should I write in my c# code to give a value to the label?

    /Johan

  • Rich Green 2246 posts 4008 karma points
    Mar 27, 2011 @ 21:04
    Rich Green
    0

    Hi Johan,

    We do a similar thing to Kim, when a node gets updated we use the Document.BeforePublish event, grab an auto id from another database (if the node doesn't have one already), then we modify the document property.

    Rich

  • Johan Plesner Hamann 105 posts 199 karma points
    Mar 27, 2011 @ 21:45
    Johan Plesner Hamann
    0

    Hi Rich

    I have no idea how I should do it from what you say. my knowledge is not great yet. I had hoped that I could use simple code like

    currentPage.getProperty ("number"). Value = value;

    I looked a little on this link. http://our.umbraco.org/forum/developers/xslt/18699-Listing-Most-Visited-Page
    But it seems I have done the same without xslt.

    Johan

Please Sign in or register to post replies

Write your reply to:

Draft