Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 936 posts 2571 karma points
    Mar 28, 2014 @ 09:11
    Claushingebjerg
    0

    XSLT and new cropper in 7

    Does anybody know if its possible to use the new cropper in xslt or if its razor only?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 28, 2014 @ 09:12
    Jan Skovgaard
    100

    Hi Claus

    Don't think it's possible to use it with XSLT since the data stored is in JSON format. But have not tried it though...but does not seem like it.

    /Jan

  • Claushingebjerg 936 posts 2571 karma points
    Mar 28, 2014 @ 09:23
    Claushingebjerg
    0

    The beginning of the end for the rebel alliance :|

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 28, 2014 @ 09:37
    Jan Skovgaard
    1

    Well I guess it's a matter of the rebel alliance stepping up and help the HQ add support for XML. If someone makes a pull request that adds the support I don't think it will be a problem...but yes, it's kinda sad :'(

    /Jan

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Mar 28, 2014 @ 09:40
    Chriztian Steinmeier
    2

    Hi guys,

    Have a look here

    There is (of course) a way to get those slimy JSON bits into a format better suited to XSLT - we have a JsonToXml() (horribly cased, I know :) extension in 7.x, so yes - it's possible - I haven't had the time to experiment yet though, but if it makes sense for me, my _MediaHelper.xslt will definitely try to make use of this...

    BUT - the crops in CropUp were stored as JSON too, but there were extensions to get the desired crops without messing with the actual coordinates etc. yourself. So I guess it's really a matter of getting an App_Code .cs file that makes the CropUrl() available to XSLT, right?

    /Chriztian

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 28, 2014 @ 12:54
    Jan Skovgaard
    0

    Hi Chriztian

    I was totally not aware of this :) If this works then I'm ok with things. Hope I can find some time to play around with it. Just got my gun loaded with new ammo...

    Cheers, Jan

  • Claushingebjerg 936 posts 2571 karma points
    Mar 28, 2014 @ 12:58
    Claushingebjerg
    2

     :)

    Oh by the way -  aren't App_Code xslt extensions broken in 7 at the moment?

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 28, 2014 @ 13:17
    Jan Skovgaard
    1

    Hi Claus

    Seems like it's still in progress according to this issue http://issues.umbraco.org/issue/U4-3425

    /Jan

  • Dan Okkels Brendstrup 101 posts 197 karma points
    Dec 11, 2014 @ 14:57
    Dan Okkels Brendstrup
    2

    The Rebel Alliance steps up to the plate! Kenn has just submitted a pull request to automatically convert JSON datatype content to XML when saving to the content cache. Which means that the image cropper is usable from XSLT, as are all other datatypes that save JSON. And the entire content cache is queryable in XSLT (querying blobs of JSON in CDATA is pretty useless).

    Rally around the Alliance, cast your votes! :)

Please Sign in or register to post replies

Write your reply to:

Draft