Options

Dynamic Descriptions and Price Lists

winnjewettwinnjewett Registered Users Posts: 329 Major grins
I have had a few people tell me that they were interested in updating a price list on a number of galleries. Here is the solution I have hacked out. It would be great if sm could build something into the site, but for now, this works:

1) In the javascript section put:
[php]function smHacks(){
if(document.getElementById('r1') != null){
document.getElementById('r1').innerHTML = 'your price list';
}
}[/php]
You can replace 'your price list' with any sort of html, including tables, divs or whatever.

2) In the Body Tag section put:
[php]<body onload="smHacks(); return true;">[/php]
3) In the description of your galleries, put:
[php]<div id=r1></div>[/php]
</pre> 4) In your style sheet, put:
[php]#r1{height: 80px;}[/php]
This ensures that the page does not shift down when the code is placed above the images. You should adjust the height to suit your price list.

You can also add other prices or descriptions. Here are two that I use:

http://racing.smugmug.com/gallery/584272
http://photography.brilliantphoton.com/gallery/541492

-Winn
Sign In or Register to comment.