9 posts by 5 authors in: Forums > CMS Builder
Last Post: June 17, 2009   (RSS)

Re: [hk] How to show a specific record within a search result?

By gkornbluth - March 9, 2009

Hi Helmut,

You might want to look into either lightbox, milkbox or Slide Show Pro for displaying your images. These will allow you the links that you're looking for and offer you a lot more flexibility in image display. They all integrate easily into CMS Builder.

You might find the explanations on these and other topics in my CMSB Cookbook helpful.

You can see an example of a milkbox implementation that I did for a photographer at http://www.elleschorrphotography.com


Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [hk] How to show a specific record within a search result?

By Dave - March 9, 2009

Hi Helmut,

Try some code like this. Note, change that tablename and fieldname to match yours:

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: [Dave] How to show a specific record within a search result?

By avrom - June 16, 2009

Hi David,

I'm trying to do the exact same thing for a list record:
http://www.hydroglove.com/new/sizing_chart.php


<?php if ($sizing_chartMetaData['prevPage']): ?>
<div id="prevLink">
<a href="<?php echo $sizing_chartMetaData['prevPageLink'] ?>"><img src="images2/button_03.gif" width="28" height="45" /></a> <a href="<?php echo $sizing_chartMetaData['prevPageLink'] ?>">PREV</a>
</div>
<?php endif ?>

Instead of displaying the word PREV I want to display the actual size of the previous record:

<?php echo $record['size'] ?>

from

list($sizing_chartRecords, $sizing_chartMetaData) = getRecords(array(
'tableName' => 'sizing_chart',
'perPage' => '3',
));

Thanks Dave !
Avrom

Re: [virgodesign] How to show a specific record within a search result?

By ross - June 17, 2009

Hi Avrom

Thanks for posting!

Did you actually need a hand with something on this one? Or did you want to show up what you had setup? I checked the page out and I thought it was working ok.

Let me know either way if you don't mind :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] How to show a specific record within a search result?

By avrom - June 17, 2009

Hi Ross,

Yes its working fine, with a PREV and NEXT link. But I actually wanted to display the PREV and NEXT links with the actual SIZE value:

Instead of displaying the word PREV I want to display the actual size of the previous record:

<?php echo $record['size'] ?>

Cheers and Thanx
Avrom

Re: [virgodesign] How to show a specific record within a search result?

By Dave - June 17, 2009

Hi Avrom,

That one might be a little tricky. Can you attach your viewer page so we can see what you have now?

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] How to show a specific record within a search result?

By avrom - June 17, 2009

Dave here it is:

http://www.hydroglove.com/new/sizing_chart.php

Cheers
Avrom

Re: [virgodesign] How to show a specific record within a search result?

By Dave - June 17, 2009

Hi Avrom,

Sorry, I meant could you attach the sizing_chart.php file to the post so we could see the source code?

Thanks!
Dave Edis - Senior Developer
interactivetools.com