Announcement

Collapse
No announcement yet.

Linking to and External Image URL

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

    Linking to and External Image URL

    In Actinic V10.04 is there a way to insert a URL to call up an external image for both the General tab and the Extended information tab. Thanks Peter

    #2
    Do you mean link to an image on another website or just include an extra image?.
    Peblaco

    Comment


      #3
      Linking to an External Image

      Hi, thank you for responding. Yes, link to an image on another website, I was hoping there was a way to put the URL in the Image boxes under General and Extended (as you would with a local image), so that it is positioned automatically etc. Regards Peter

      Comment


        #4
        You cannot enter an URL for the Product Image entry. It's intended to browse for an image on your system and errors if that's not found.

        However you can create a Variable and use this instead.

        Go to Design / Library / Variables. Right-click Products and choose New Variable. Set Name and Prompt to "ExternalImage". Set Group: Product, Place of Setting: Product, Panel Name: General, Type: Text, Allow Empty Value, checked, leave other settings as they are. OK out.

        Now go to Design / Library / Layouts / Product Image / Standard Product Image and replace it's contents with:
        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPopUpDisplayedByImage%22%20%2f%3e">
           <actinic:block if="%3cactinic%3avariable%20name%3d%22ExtendedInformationType%22%20%2f%3e%20%3d%3d%20%22Opens%20in%20a%20Pop%2dUp%20Window%22">
              <a href="<actinic:variable name=ExtendedInfoPageEncoded />" target="ActPopup" onclick="return ShowPopUp('<actinic:variable name=ExtendedInfoPageEncoded />',<actinic:variable name="ExtInfoWindowWidth" />,<actinic:variable name="ExtInfoWindowHeight" />);">
           </actinic:block>
           <actinic:block if="%3cactinic%3avariable%20name%3d%22ExtendedInformationType%22%20%2f%3e%20%3d%3d%20%22Opens%20in%20the%20Same%20Window%22" >
              <a href="<actinic:variable name="ExtendedInfoPageName" />">
           </actinic:block>
        </actinic:block>
        
        <actinic:block if="%3cactinic%3avariable%20name%3d%22ExternalImage%22%20%2f%3e%20%3d%3d%20%22%22" >
        	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e">
           <img src="<actinic:variable name="ProductImageFileName" />"
              border="0"
              width="<actinic:variable name="ProductImageWidth" />"
              height="<actinic:variable name="ProductImageHeight" />"
              alt="<actinic:variable name="ProductName" encoding="strip"/>" />
        	</actinic:block>
        	
        	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e%20%3d%3d%20False">
        		<img src="<actinic:variable name="DefaultProductImage" />"
        			border="0"
        			alt="<actinic:variable name="ProductName" encoding="strip"/>" />
        	</actinic:block>
        </actinic:block>
        
        <actinic:block if="%3cactinic%3avariable%20name%3d%22ExternalImage%22%20%2f%3e%20%21%3d%20%22%22">
        	   <img src="<actinic:variable name="ExternalImage" />"
              border="0"
              alt="<actinic:variable name="ProductName" encoding="strip"/>" />
        </actinic:block>
        
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPopUpDisplayedByImage%22%20%2f%3e">
           </a>
        </actinic:block>
        OK out.

        Now in your Product Details / General / Product / ExternalImage, if you enter an URL of an external image that image will be used instead of the Product Image one.

        For Extended Info, you'd create another Variable called ExternalExtendedInfoImage (as above but set Panel Name to Extended Information) and use the following for layout Standard Extended Info Image:
        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22ExternalExtendedInfoImage%22%20%2f%3e%20%3d%3d%20%22%22">
        	<img src="<Actinic:Variable Name="ExtendedInfoImage"/>"
        		width="<Actinic:Variable Name="ExtendedInfoImageWidth"/>"
        		height="<Actinic:Variable Name="ExtendedInfoImageHeight"/>"
        		alt="<actinic:variable name="ProductName" encoding="strip" />"
           />
        </actinic:block>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22ExternalExtendedInfoImage%22%20%2f%3e%20%21%3d%20%22%22" >
        	<img src="<actinic:variable name="ExternalExtendedInfoImage" />"
        		alt="<actinic:variable name="ProductName" encoding="strip" />"
           />
        </actinic:block>
        Note that you'll probably need to make a dummy entry for the Extended Info Image to get this to work. Or locate the existing BlockIf's around the Extended Info Image call and amend them to work if the ExternalExtendedInfoImage entry is non-empty as well.

        Others will probably point out that this is a bad idea as you will have little control over the content or existence of these images.

        There was a hilarious thread some time ago where a non-Actinic site selling power tools was hot-linking to an Actinic users images. Our guy got a fantastic revenge by changing his image to one that said in big red text, "Today Only - this product half-price", or words to that effect. By the end of the day there were even postings on power tool user forums about this fantastic offer.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Thank you very much for your reply, I will try this. Regards
          Peter

          Comment


            #6
            External Image URL

            Hi, I have tested and that works fine, thank you. However, I need to import to this new field. Using the Import Wizzard the new Field doesn't appear in the Map Fields window as an Actinic Field, is it possible to set the new field to appear as an Actinic Field?
            Thanks
            Peter

            Comment


              #7
              Are you using the Flat Fie Import? If so, only limited pre-set fields are available.

              Hierarchical Import works fine. When I do a Hierarchical Import these new fields appear in the "to Actinic Field" column.

              There is a converter that converts flat files to hierarchical. See the Help for "Converting a File".

              Or if there's an unused text field in the flat file import, you could try using that instead.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                External Image URL

                Yes I was using Flat file to import from, I will try the converter and a Hierarchical Import.

                With regards to the Extended Images could you explain a little more your comment below:

                Note that you'll probably need to make a dummy entry for the Extended Info Image to get this to work. Or locate the existing BlockIf's around the Extended Info Image call and amend them to work if the ExternalExtendedInfoImage entry is non-empty as well.


                Thanks
                Peter

                Comment


                  #9
                  could you explain a little more
                  Some Extended Info layouts only include the Standard Extended Information Image layout if the Extended Info Image has an image file-name set. So you need to enter something there (it won't show if you've provided an external image) to make it work.

                  You could fix this by changing the BlockIf around the Extended Info image to work if either the Extended Info Image OR the External ones are set. Only you know what layouts you are using so I'm leaving this up to you. Tutorials on BlockIf's are in the Starter / Advanced Guides and on the Community.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment

                  Working...
                  X