Announcement

Collapse
No announcement yet.

Actinic path description

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Actinic path description

    I've noticed that Actinic has a slightly different path desciption to a file path than HTML requires.

    For example if I add a file with the path:
    /Photos/MAIN-DESIGN/CHECKOUT/mypicture.gif

    inside actinic's variable "FragmentImageFileName" then actinic changes the path to:

    \Photo\MAIN-DESIGN\CHECKOUT\mypicture.gif changing the "/" to "\",

    making this link useless especially when I use it as a background for a DIV.
    I do not want to place all my images on the site folder.

    How do I go about rectifying this please ?
    www.grafea.co.uk
    Vintage Leather briefcases

    http://www.grafea.com
    Designer leather bags
    --------------------------
    Yanni Kioupouroglou

    #2
    A backslash is correct to use when it is referring to a local file AFAIK (take a look at product or section images defined for instance). So it's not doing anything wrong. You also have a slash before giving the file location, again i think that is wrong. I have a "DesignImages" folder on all sites I create, to define files from within there used in css, i use the URL syntax url("DesignImages/blah.jpg"). Which of course as you will no doubt know means the file is loaded into the acatalog folder online.

    Make sure you understand the difference between the slashes and also more importantly the relationship between the offline folders and the online one, ie there isn't one, all go into the same place online.

    Comment


      #3
      Thanks Lee,

      Perhaps I did not phrase it properly.
      It is the preview that I'm concerned with.

      When I upload the site it does work online but offline either inside actinic or out the images do not display.

      You know the directory you store all your images, do you actually copy it on all preview directories within actinic e.g DesignPreviewHTML and PreviewHTML or perhaps you do you include the images as additional files?

      It's mainly the css code:

      background-image: url('<actinic:variable name="FragmentImageFileName" />'); that doesn't work unless the image is on the root directory of the site and not on a sub-directory.

      However if I use this:
      <img src="<actinic:variable name="FragmentImageFileName" />">

      it works fine irrespective to what path the image has.
      Very bizarre, please try it...many thanks
      www.grafea.co.uk
      Vintage Leather briefcases

      http://www.grafea.com
      Designer leather bags
      --------------------------
      Yanni Kioupouroglou

      Comment


        #4
        I have a sub folder of the site folder for design images, they all go in there. I never copy anything to anywhere as never needed to and i never put my files in the root of the site, it works fine at that. When referencing images to be used in css, you need to use a / not a \.

        There is a bug on the background image filename field in site options, when you add a file that is not in the root, it adds a \ instead of a /, this stops it showing on preview but it is ok online, just reverse the slash and it will work fine. I reported this one about 4 years ago, i bypass it nowadays and just code my own directly into the actinic stylesheet.

        Comment


          #5
          Try:
          Code:
          background-image: url('<actinic:block php="true">echo str_replace('\\', '/', '<actinic:variable name="FragmentImageFileName" encoding="perl" selectable="false" />');</actinic:block>');
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment

          Working...
          X