Copied to clipboard

Flag this post as spam?

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


  • Jakob Jensen 23 posts 43 karma points
    Nov 09, 2010 @ 22:44
    Jakob Jensen
    0

    How to show the cropped image

    maybe this is a stupid question.

    what datatype are you using on the doctype to select and show the cropped image?? i only got the media picker

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 09, 2010 @ 22:52
    Jan Skovgaard
    0

    You need to create the datatype first, in the developer section under "datatypes".

    /Jan

  • Jakob Jensen 23 posts 43 karma points
    Nov 09, 2010 @ 22:55
    Jakob Jensen
    0

    i can get the crop to work in the media folder, but how do i pick the image i want to show in my docktype???

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 09, 2010 @ 23:00
    Jan Skovgaard
    0

    Have a look at Dirk's suggestion in this post: http://our.umbraco.org/projects/backoffice-extensions/image-cropper/image-cropper/3085-Automatic-crop-generation-and-XSLT-for-media-items

    I think this answers your question? :-)

    /Jan

  • Jakob Jensen 23 posts 43 karma points
    Nov 09, 2010 @ 23:23
    Jakob Jensen
    0

    <xsl:variable name="media" select="umbraco.library:GetMedia($currentPage/foto, 0)" />

    <img src="{$media/umbracoFile}" alt="{$media/altText}" />
      

    i got this XSLT to get the image but how do i get the cropped one

  • Jakob Jensen 23 posts 43 karma points
    Nov 09, 2010 @ 23:40
    Jakob Jensen
    0

    <xsl:template match="/">

     <xsl:variable name="media" select="umbraco.library:GetMedia($currentPage/foto, 0)" />

           
      <img src="{$media/cropper//crop [@name ='Profil']/@url}" alt="{$media/altText}" />
      
    </xsl:template>

    i got this to work

    foto =  Alias of the datafield on the docktype

    cropper =  Alias of the cropper on the image datatype

    Profil = a crop size i added under the image cropper datatype

Please Sign in or register to post replies

Write your reply to:

Draft