Announcement

Collapse
No announcement yet.

og image code when image in subfolders on PC

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

    og image code when image in subfolders on PC

    I have this included in my header code for product pages:
    Code:
    <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');echo $path_parts['basename'], "\n";</actinic:block>" />
    Works fine when images are in the Site1 folder but my client has multiple folders so on the live site the url is this:
    Code:
    http://79.170.44.130/clientaddress.co.uk/acatalog/NOT_CATALOG/Product%20Images/Pencarrie/Thumbnail/599B_th.jpg
    I have tried
    Code:
    <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:block php="true">echo basename(str_replace('\\','/', '<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />'));</actinic:block>" />
    but same result - therefore image not found.

    How can I specify just the image filename without the folder names?

    The result I would like is this
    Code:
    http://79.170.44.130/clientaddress.co.uk/acatalog/599B_th.jpg
    Thank you
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk
Working...
X