I'm compiling a catalogue of e-learning content for the schools market. As well as an image of the content I want to add icons per titles to indicate if it is a Windows title, mac title, which Key Stage etc. In total each title will have 8 possible icons that could be added. How and where are these icons added?
Announcement
Collapse
No announcement yet.
Icons & Image for a product
Collapse
X
-
Hi Ewan,
if these are to change on a product by product basis (which I guess they would) you can use the CUSTOMVAR approach. Create a new CUSTOMVAR under Advanced | Custom Properties eg : PLATFORM and then in the Act_ProductLine.html in the root of the site1 folder simply add in the code CUSTOMVAR:PLATFORM
Against the product select the "properties" tab and click the "+" symbol and slelect PLATFORM from the drop down ... specify the image name eg: windows.gif and tick "use as customvar" and file name" ... Actinic will then replace the code with the image.
You will need to repeat for as many images you need. If a lot of the images are the same you may just want to mock-up the variations into one GIF file and add in the 1 image against the product.
-
Here's a way where you can use a single Custom Property to contain a list of features (one character per feature). This will be used to automatically display the appropriate icons.
Create a Custom Property called FEATURES
In each product use the Custom Property to hold a character, e.g. W, L, X to represent each feature.
Put in as many characters as required. E.g. WL or XA
Put the following into Act_Primary.html just above the </head> tag.
Code:<script type="text/javascript"> <!-- var icons = new Array('windows.jpg', 'linux.jpg', 'osx.jpg', 'advanced.jpg', 'intermediate.jpg', 'novice.jpg');// extend this array to add new icons var keys = new Array('W', 'L', 'X', 'A', 'I', 'N'); // extend this array to add new characters function showicons(cvar){ cvar = cvar.toUpperCase(); for ( i=0; i < keys.length; i++) { if ( cvar.indexOf(keys[i]) > -1 ) document.write('<img src="' + icons[i] + '"> '); } } // --> </script>
and in the Product Template where you want the icons to be displayed put
Code:<script type="text/javascript"> <!-- showicons('CUSTOMVAR:FEATURES'); // --> </script>
Norman - www.drillpine.biz
Edinburgh, U K / Bitez, Turkey
Comment
-
I can't see the second image
I'm using the CUSTOMVAR approach until I have learn't more about HTML programming. I have created a CUSTOMVAR in the Advanced:Custom Properties called Apple Logo (APPLE_LOGO). In the properties fpr the product details I have given the path for the image under the value section C:\images\applelogo.gif and have edited the Act_Productline.html and clicked the apply button. The image doesn't show up. What have I done wrong?
Comment
-
Change the customvar to "APPLE_LOGO.gif" (this needs to be the same case as the actual filename) getting rid of the c:\images\ - your website does not have a c:\images\ folder (unless you are hosting on an unusual windows setup). All image files are normally uploaded straight into the /acatalog/ folder, which is the same place your web pages are.Bill
www.egyptianwonders.co.uk…
Text directoryWorldwide Actinic(TM) shops
BC Ness Solutions Support services, custom software
Registered Microsoft™ Partner (ISV)
VoIP UK: 0131 208 0605
Located: Alexandria, EGYPT
Comment
-
Partial Success
I've changed the file name to APPLE_LOGO.GIF in the Advanced|Custom Properties, in the Product Details and checked the searchable, Use as CUSTOMVAR, File Name and File Content boxes and edited the Act_Productline.html template with the entry CUSTOMVAR:APPLE_LOGO. I have now got something on the product page but not the logo. It is a line of text saying GIF89a with a small box next to it. I feel i'm close but I'm not picking up the image. Any further suggestions?
Comment
-
Sorry, I just read your post #6 again.
The CUSTOMVAR name in Advanced | Custom Properties does not have to be the same as the image - APPLE_LOGO is fine for that - though you may want to call it MYPAGELOGO and reuse one CUSTOMVAR for all the pages. On the Product properties tab, in the first column, select the CUSTOMVAR name, in the second column should be the actual filename, in this case applelogo.gif - tick use as customvar, filename and use file contents.Bill
www.egyptianwonders.co.uk…
Text directoryWorldwide Actinic(TM) shops
BC Ness Solutions Support services, custom software
Registered Microsoft™ Partner (ISV)
VoIP UK: 0131 208 0605
Located: Alexandria, EGYPT
Comment
-
Are you seeing this in preview or on a live site?
Check the spelling (and capital letters) in the filename and in the properties tab where you have added the customvar.Bill
www.egyptianwonders.co.uk…
Text directoryWorldwide Actinic(TM) shops
BC Ness Solutions Support services, custom software
Registered Microsoft™ Partner (ISV)
VoIP UK: 0131 208 0605
Located: Alexandria, EGYPT
Comment
Comment