How would I add to my Gallery and my Homepage JQuery Fader
6 posts by 2 authors in: Forums > CMS Builder
Last Post: February 3, 2009 (RSS)
By lterenzi - January 30, 2009
Here is my site (not live yet but close!!)
http://www.thewrapsource.com/index.php
I am looking to have my clients add images to the fader on the home page and then if you click "Wrap Gallery" I want them to be able to add photos each section or several at a time. ie: They can add a photo to "Cars" that may also show up in "Floral and Garden Centers" or vice versa.
I am not sure how to add this functionality into the editors in CMSB for those pages. Feel free to ask questions as I may not have explained it too well.
Thanks!
Lenny
Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign
Re: [lterenzi] How would I add to my Gallery and my Homepage JQuery Fader
By Dave - January 30, 2009
Let's start with the rotating images on the front page. It looks like the code in the page for that is as follows:
<ul id="slider">
<li><img src="/images_top/slider_empty.png" alt="img"></li>
<li><img src="/images_top/slider_colortyme.png" alt="img"></li>
<li><img src="/images_top/slider_carroll.png" alt="img"></li>
</ul>
So to add to those you'd have CMS Builder output a list of images in <li></li> tags. You could either have a section called "Frontpage images" or a section for "Images" that had checkboxes for "frontpage", "cars", etc and let the client check which sections they wanted the image to appear in. Then you would list images for a specific section by adding a where like this:
'where' => " cars_section = 1 ",
Hope that helps!
interactivetools.com
Re: [Dave] How would I add to my Gallery and my Homepage JQuery Fader
By lterenzi - January 31, 2009
It does shine a light but I think I need it a little brighter :)
How do I get it to output the code I need. I hate to say I may need step-by step on how to do this but I might. If that falls under paid consulting just let me know!
Also for the Gallery you will see the string of code for the images has a few extras in there ths is what I need to be output for that section:
<li><a href="/pathtoLGimg/ImageName.jpg" rel="lightbox[ImageSetname]"><img src="/pathtoSMimg/ImageName.jpg" alt="img" width="150" height="110"><span class="enlarge"></span></a></li>
Thanks once again for the quick reply!
Best
Lenny
Lenny
Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign
Re: [lterenzi] How would I add to my Gallery and my Homepage JQuery Fader
By Dave - February 2, 2009 - edited: February 2, 2009
The code should look something like this:
<?php foreach ($record['yourUploadField'] as $upload): ?>
<li><a href="<?php echo $upload['urlPath'] ?>"
rel="lightbox[ImageSetname]"><img src="<?php echo $upload['thumbUrlPath'] ?>"
alt="img" width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>"><span class="enlarge"></span></a></li>
<?php endforeach ?>
You'll need to change the variable name and fieldname that are in red to match yours.
Let me know if that works for you.
interactivetools.com
Re: [Dave] How would I add to my Gallery and my Homepage JQuery Fader
By lterenzi - February 3, 2009
Lenny
Hey Monkey! Design
graphic design • web development • blog
--
lenny@heymonkeydesign.com
919•279•3301
--
web: www.heymonkeydesign.com
twitter: @heymonkeydesign
Re: [lterenzi] How would I add to my Gallery and my Homepage JQuery Fader
By Dave - February 3, 2009
interactivetools.com