Announcement

Collapse
No announcement yet.

how can I use the product image filename outside of a <img src tag?

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

    how can I use the product image filename outside of a <img src tag?

    Hi folks - ive searched and searched... but no luck.

    I want to return the productimagefilename in a string for Pinterest.com pin...

    I am using this in the layout:

    &media=www.metaldice.co.uk/acatalog/<actinic:variable name="ProductImageFileName" />

    but I get this in the webpage:
    media=www.metaldice.co.uk/acatalog/P:\dice\metal_d6spotmix.png

    I know that using img src="ProductImageFileName" gives just the filename and not the path...

    But I cant find a way of getting the filename WITHOUT the path without img src...

    anyone know how to get round this?
    thanks
    Andy Warner

    www.legendgames.co.uk - rpgs, boardgames, dice and other geeky stuff
    www.RPGMiniatures.com D&D and Star Wars Miniatures

    Both running the Cart from Search Page hack

    Also www.mainlymurder.co.uk www.thegamesplace.co.uk and www.thediceplace.co.uk

    All running V8.5.2 Multisite on a windows 7 quad PC, augmented by Mole End automation, from a single shared database, using actinic specific hosting from Host-IT.

    #2
    Norman has posted a number of times, one particularly recently on how to strip off all the crud that you do not want, suggest a search of the forum to find that, did just what you want as i recall.

    Comment


      #3
      This should work:
      Code:
      &media=www.metaldice.co.uk/acatalog/<actinic:block php="true">echo basename('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');</actinic:block>
      You may see something different when Previewing compared to the Live site. So best look on the live site to see if the code works there.

      Also try using http://
      Code:
      &media=http://www.metaldice.co.uk/acatalog/<actinic:block php="true">echo basename('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');</actinic:block>
      P.S. Keeping images outside of your Site folder (or not in a sub-folder of said Site folder is) a bad idea.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Originally posted by NormanRouxel View Post
        P.S. Keeping images outside of your Site folder (or not in a sub-folder of said Site folder is) a bad idea.

        cheers Norman,

        you are, as usual, THE MAN!

        I have a shared system - 10 sites from 1 database and all use same images - seems to work. Whats the issue with the setup i've got in place?
        Andy Warner

        www.legendgames.co.uk - rpgs, boardgames, dice and other geeky stuff
        www.RPGMiniatures.com D&D and Star Wars Miniatures

        Both running the Cart from Search Page hack

        Also www.mainlymurder.co.uk www.thegamesplace.co.uk and www.thediceplace.co.uk

        All running V8.5.2 Multisite on a windows 7 quad PC, augmented by Mole End automation, from a single shared database, using actinic specific hosting from Host-IT.

        Comment


          #5
          If your images are scattered all over the place you'll not be able to make full Snapshots. Or more accurately, the Snapshots won't be able to be imported into another system without losing said images or doing a lot of manual correcting.

          Keep everything within the Site folder and a Snapshot is a complete record of your site.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Ok, thats certainly worth knowing.
            Andy Warner

            www.legendgames.co.uk - rpgs, boardgames, dice and other geeky stuff
            www.RPGMiniatures.com D&D and Star Wars Miniatures

            Both running the Cart from Search Page hack

            Also www.mainlymurder.co.uk www.thegamesplace.co.uk and www.thediceplace.co.uk

            All running V8.5.2 Multisite on a windows 7 quad PC, augmented by Mole End automation, from a single shared database, using actinic specific hosting from Host-IT.

            Comment

            Working...
            X