Copied to clipboard

Flag this post as spam?

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


  • James N 3 posts 23 karma points
    Apr 14, 2011 @ 18:06
    James N
    0

    Dynamic file paths for images

    Ok, there has to be an easy answer to this that I am missing....

    I have a local install of Umbraco with a http://localhost/umbraco1 for development purposes.

    First, any images inserted within an article have an absolute address which breaks. For example: <img src="/media/99/picture.jpg"> really needs to be <img src="/umbraco1/media/99/picture.jpg">.  The RichText editor forces images back to the default absolute address. Is there a fix?

    Second, macros that load images need paths that adjust to your position in the site map.

    What I am looking for is something like this within the XSLT file

    <img src="{umbraco.library:SuperDuperNiceUrl('media/misc/picture.jpg')}">

    which will adjust the image path to:

    <img src="/umbraco1/media/misc/picture.jpg">

    Suggestions anyone?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Apr 14, 2011 @ 18:15
    Tom Fulton
    0

    Hi,

    Is /umbraco1 a virtual directory with it's own application or just a regular subfolder?  I believe the above issue will happen when it's a regular subdirectory and not an application.

    Also are you running 4.7?  There was a bug in previous versions (< 4.6 ?) with the same issue when running in a virtual directory.

    -Tom

  • James N 3 posts 23 karma points
    Apr 14, 2011 @ 18:25
    James N
    0

    It is a virtual directory with its own application.

    no, I just realize it is not version 4.7.  So, obviously I need to upgrade before continuing.

    -Jim

  • James N 3 posts 23 karma points
    Apr 14, 2011 @ 20:08
    James N
    0

    Ok, this is upgraded. It is running at 98%. I might just do a fresh install of 4.7.0 on a host where it can reside in the site root. There are some new quirky issues arising requiring hacking. It just doesn't play nice within a virtual directory.  Thanks

     

  • 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.

    Continue discussion

Please Sign in or register to post replies