CMS Builder for Gallery

9 posts by 3 authors in: Forums > CMS Builder
Last Post: July 2, 2008   (RSS)

By matrix - June 17, 2008

I thought I could do this, but maybe not.

Building a gallery for an artist, and what I need is a section where the list viewer displays thumbnail images for a gallery of images. Each thumbnail is linked to the detail page where the larger image is displayed.

Did that. So far, so wonderful.

But now I'm stuck on the Detail Page. I really need Next & Previous links on each Detail Page for sequential navigation through the individual image pages if someone doesn't want to return to the section list (thumbnail display) each time.

Is there any way to do this and maintain the thumbnail display with the 15 or 20 images we anticipate for each section?

Please say yes and tell me what I've been missing. I think that all the postings I've read refer to the List Page only, and we need that page to work as described.

Thank you!
Happy Interactive Tools product user since 1999

Re: [matrix] CMS Builder for Gallery

By Dave - June 18, 2008

Hi Matrix,

There's no automatic way to do this. If you can take it as far as you can, then create a mockup of how the image detail page should look with prev and next links, I can help you with it.

Just send me the urls, FTP and CMS login details to dave@interactivetools.com (email, don't post login details to the forum) and I'll see what I can do and post back here for everyone who wants to do the same kind of thing.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [matrix] CMS Builder for Gallery

By Dave - June 19, 2008

Hi Matrix, I've emailed you about this. Feel free to email me back if there's any other issues.

This was another case of wanting << prev and next >> links on detail pages so users can page through without having to go back to the list page.

A lot of people have been asking for this so I've put together an experimental new feature that supports it. Note that this may not work well sections with many records (1000+) but it's a good work around for now.

Here's how to do it. Add this code to your viewer file or /lib/viewer_functions.php (it will be in the next release):

// Note: This function is EXPERIMENTAL and may change in future
function getPrevAndNextRecords($options) {

// error checking
if (!@$options['tableName']) { $errors .= "No 'tableName' value specified in options!<br/>\n"; }
if (!@$options['recordNum']) { $errors .= "No 'recordNum' value specified in options!<br/>\n"; }

// load ALL records matching
list($records, $metaData) = getRecords(array(
'tableName' => $options['tableName'],
));

// get prev and next records
$prevRecord = array();
$nextRecord = array();
$foundRecordNum = false;
foreach ($records as $record) {

// set next record
if ($foundRecordNum) { $nextRecord = $record; break; }

// set prev record
if ($record['num'] == $options['recordNum']) { $foundRecordNum = true; }
if ($foundRecordNum) { $prevRecord = @$lastRecordSeen; }
$lastRecordSeen = $record;
}

return array($prevRecord, $nextRecord);
}


Then add this code to the bottom of step 1 in your detail viewer:

list($prevRecord, $nextRecord) = getPrevAndNextRecords(array(
'tableName' => 'news',
'recordNum' => getNumberFromEndOfUrl(),
));


Then add this where you want your prev/next links to go:

<?php if (@$prevRecord): ?>
<a href="<?php echo $prevRecord['_link'] ?>"> &lt;&lt; <?php echo $prevRecord['title'] ?></a>
<?php endif; ?>

<?php if (@$nextRecord): ?>
<a href="<?php echo $nextRecord['_link'] ?>"><?php echo $nextRecord['title'] ?> &gt;&gt;</a>
<?php endif; ?>


Hope that helps, let me know if you have any questions or problems with this.
Dave Edis - Senior Developer
interactivetools.com

Re: [matrix] CMS Builder for Gallery

By matrix - June 19, 2008

This is exactly what we needed! It is perfect.

Thank you so much. Having the ability to add this to the detail pages opens up a whole new world of possibilities. For instance, in addition to the gallery feature we're building, it's a great way to prompt visitors to move on to the next article.

Your support absolutely can not be beat. The BEST!

Thank you.
Happy Interactive Tools product user since 1999

Re: [matrix] CMS Builder for Gallery

By chassa2556 - July 1, 2008

Hi Matrix

Could you publish a link to show how this works on the actual site please? I'd be interested to see how the interface works.

thanks

Re: [chassa2556] CMS Builder for Gallery

By Dave - July 1, 2008

This is an experimental feature, but basically it lets you add links to the bottom of your pages like this:

<< prev record - next record >>

That let you page through the records without having to go back to the list page. What the function does is get you the links for those. The text can say whatever you want (or be a graphic).

Hope that helps.
Dave Edis - Senior Developer
interactivetools.com

Re: [chassa2556] CMS Builder for Gallery

By matrix - July 1, 2008 - edited: July 1, 2008

Hi Chassa,

I'd be happy to post the URL, but won't do that without our client's permission. However, even though Dave points out that this solution is experimental, it works like a charm for us. This client is very actively using 10 "albums" contained in a "gallery" all produced through CMS Builder.

I don't know whether this idea is relevant for your needs, but we researched just about every photo gallery option we could find, open source and otherwise. Installed several, but came back to CMS Builder because it is, hands down, the easiest to customize the look and feel of to slip into an existing design.

It seems that every gallery out there has a different template system applied (that is, assuming the appearance is configurable), and for long term, reliable solutions, we've found that it's much smarter and more cost-effective to go with Interactive Tools. This way we don't have to bend the carefully thought out, user-friendly design of the whole site to fit a specific product...galleries, etc.

How we did this was to simply present the thumbnails in a list page, each linked to a detail page with the image and lots of content. With the addition of the next and previous links for each detail page, it's perfect.

So, the interface only requires the artist to upload a new work for each new page, add details and content in a couple of additional text box fields, and publish. It's especially helpful that the detail pages can be re-ordered by dragging. Very nice features.

Hope this helps.
Happy Interactive Tools product user since 1999

Re: [matrix] CMS Builder for Gallery

By chassa2556 - July 2, 2008

Thanks very much matrix I have just built our first site in CMS builder but got a bit out of my depth so IT had to take over.

But I agree I like the program I just need to see some good practical solutions. I also need to build a site myself from the ground up so I get an idea of the logic. I'd be really grateful if you could get the go ahead from your client to send me the link. charles.dewey@gmail.com