Prism 3 is a hosted catalogue solution which uses a themes system for adjusting its look and feel. To add Juice to a Prism theme, you will need to do the following:
All Prism tenancies have a sandbox, a copy of your catalogue that is designed to experiment with new customisations. It is recommended you make any modifications there first and then copy the theme across to the main tenancy when complete.
Before you can add the scripts you will need to download a copy of the latest version. This is currently version 0.7. It can be found on the downloads page.
You will also need a text editor to edit the file. Notepad will do, though ideally a web editor of some kind (NOT MS Word as this may cause issues with the file later on).
Follow these steps:
1. Create a folder called js in the theme folder.
Unzip the Juice download into the js folder. So the structure looks as follows (folders in square braces):
[theme]
[js]
[examples]
[extensions]
[metadefs]
[panels]
jquery-1.4.4.min.js
juice.min.js
juiceDefault.css
footer.html
header.html
headerlinks.html
homepage.html
You may see additional files or folders, but these are the essential ones to get Juice working!
2. Create a extend file for your catalogue
Copy the file /examples/talis-prism/extend-simple.js to the js folder and rename it to extend_my_prism.js.
Open up the footer.html theme file. It should look like this:
<div class="footerStyle"> Powered by <a href="http://www.talis.com/prism/">Talis Prism</a> </div>
Append the new lines in bold to the file:
<div class="footerStyle"> Powered by <a href="http://www.talis.com/prism/">Talis Prism</a> </div> <!-- Juice 0.7 Warning! Removing the following will disable Juice Extensions --> <script type="text/javascript" src="assets/-/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="assets/-/js/juice.js"></script> <script type="text/javascript" src="assets/-/js/metadefs/talis_prism_metadef.js"></script> <script type="text/javascript" src="assets/-/js/extend_my_prism.js"></script>
3. Save the file.
Note the src attribute uses the Prism convention for addressing files stored in the tenancy theme. You do not need the full url as Prism has a base url set for your tenancy and will prepend it to file names. Note also that if you are already using jQuery to add scripting to your tenancy you do not need the
Juice 0.7 should now be working! To modify and add new extensions follow the same steps again. You should only need to edit the extend_my_prism.js file from here on in...
Note: Some extensions require a Google API key, you can get one from the Google Loader site.