Announcement

Collapse
No announcement yet.

modification to extra more info buton from AUG

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

    modification to extra more info buton from AUG

    I have followed the AUG to set up an extra more info button, my plan was to make this a "photo gallery" button so I can have either more info or a gallery or both.

    The code allows you to make a button but this button always links to the same place. Is it possible to put some code in this link so it dynamically puts the product reference somwhere in this link?

    So the link would look like:
    Code:
    http://www.mydomain.com/image_gallaries/productreference.html
    Or even better
    Code:
    http://www.mydomain.com/image_gallaries/productreference.swf
    That way I can generate flash or html files in a folder and when the gallery button is present it will link to the appropriately named file in that folder.

    Can anyone give me some pointers on how to set this up?

    Thanks,

    Alex

    #2
    I would start from a different place.

    I think you're saying that if a file called <productID>.html or <productID>.swf exists then you want a link created for it.

    The way to totally automate this would be to use some inline PHP within your product layout. E.g. (untested)
    Code:
    <actinic:block php="true">
    $prodid = '<actinic:variable name="ProductID" />';
    if ( file_exists($prodid . '.html')
      {
      echo '<a href="' . $prodid . '.html" target="_blank">More Info</a>';
      }
    if ( file_exists($prodid . '.swf')
      {
      echo '<a href="' . $prodid . '.swf" target="_blank">Gallery</a>';
      }
    </actinic:block>
    This code assumes these files are in your Site folder.

    PS I've done a Multi Product Images add on - see http://www.drillpine.biz/v8multiprod...tproducts.html where each product has a different effect.

    And a Lightbox add on - see http://www.drillpine.biz/v8lightbox/acatalog/Books.html.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      And another way to do this (no PHP needed) would be to create a product level Variable called ExtraPage of type File (allow empty). Then make code like
      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22ExtraPage%22%20%2f%3e%20%21%3d%20%22%22" >
      <a href="<actinic:variable name="ExtraPage" />" target="_blank">Click me</a>	
      </actinic:block>
      Now just browse for the file and put it into the in the product details / properties.

      This will probably allow you to keep these files in a sub-folder of your Site one.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman

        I managed to get it working using a variant of your second suggestion and I now have an extra gallery buton wher I need it to be!

        The lightbox add on is great BTW, If I hadn't already forked out for Slide Show Pro then I would have been there!

        Alex

        Comment

        Working...
        X