Copied to clipboard

Flag this post as spam?

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


  • Steve 472 posts 1216 karma points
    Sep 21, 2012 @ 22:19
    Steve
    0

    Reference an image placed with a media picker?

    Is there a way to reference an image placed with a media picker into the rich text editor?

    I would like to be able to use images placed in certian content pages (news stories) for a slide show on a landing page.

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Sep 23, 2012 @ 21:06
    Jeroen Breuer
    0

    Maybe this example can help: http://our.umbraco.org/forum/developers/extending-umbraco/20810-Embed-image-in-email#comment78715.

    There I get all images from a rich text editor and change the path. You can probably also just fetch them like that.

    Jeroen

  • Steve 472 posts 1216 karma points
    Sep 24, 2012 @ 14:37
    Steve
    0

    So, you have to create a variable "doc" and load the html into it and then look for the "img" tag? 

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Sep 24, 2012 @ 14:41
    Jeroen Breuer
    0

    Yes that's what I suggested. Get the html of the RTE (so just get the property which stores it) and use that code to search for images.

    Jeroen

  • Steve 472 posts 1216 karma points
    Sep 24, 2012 @ 15:11
    Steve
    0

    I am new to xslt and xpath so bear with me. I wouldn't need the string you defined at the begining correct? Just start by declairing the variables?

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Sep 24, 2012 @ 15:17
    Jeroen Breuer
    0

    If you're going to use XSLT you will need an xslt extension to do this. In Razor it's probably easier to do this.

    Jeroen

  • Steve 472 posts 1216 karma points
    Sep 24, 2012 @ 15:24
    Steve
    0

    Sorry, I am not following you. I've written a couple of xslt files in Umbraco allready without adding anything else to the Umbraco install. What do you mean?

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Sep 24, 2012 @ 15:36
    Jeroen Breuer
    0

    This code example is a piece of C# which you can't use in XSLT. You'll need an XSLT extension for this if you don't use Razor: http://umbraco.com/help-and-support/video-tutorials/developing-with-umbraco/xslt-extensions/introduction-to-xslt-extensions. Some more info: http://our.umbraco.org/wiki/reference/xslt/extend-your-xslt-with-custom-functions.

    Jeroen

  • Steve 472 posts 1216 karma points
    Sep 24, 2012 @ 15:41
    Steve
    0

    Sorry Jeroen, creating an extension is not an option for me since I have no admin access to the server that houses Umbraco. Is there another way to reference images placed in page content?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies