Next/Previous links on Page Viewer Page

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

By _kate_ - June 8, 2008

The code makes a previous/next button for the list page, however I would like this on the Page Viewer Page.

I am making a portfolio and I would like a previous/next link that would link to the previous/next record.

Can this be done?

Re: [AgentBristow] Next/Previous links on Page Viewer Page

By Kenny - June 8, 2008

Use a List Viewer Page instead and only show one record at a time.

Re: [sagentic] Next/Previous links on Page Viewer Page

By _kate_ - June 8, 2008

That works perfectly! Thanks for your help :)

Re: [AgentBristow] Next/Previous links on Page Viewer Page

By _kate_ - June 8, 2008

The prev/next links on the Page viewer page are working fine now I converted it to a List Page, however I have just picked up on a problem - since I made this change code on another page is no longer working properly.

I have a full list page that displays all of the items in the portfolio, and the image links to the page with all the details about that item. That was working fine until I made the above change - now it just keeps linking to record #1 and not the correct information. Here is the code I am using >

<?php foreach ($listRows as $record): ?>
<?php if ($record['type'] != "Website Design") { continue; } ?>

<h7><?php echo $record['client_name'] ?></h7><br />

<!-- image -->
<?php if ($record): ?>
<?php foreach (getUploads($options['tableName'], 'screenshot', $record['num']) as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="View Project Details" /><br/>
<?php elseif ($upload['isImage']): ?>
<a href="<?php echo $record['_link'] ?>"><img src="<?php echo $upload['urlPath'] ?>"></a><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<!-- image -->
<a href="<?php echo $record['_link'] ?>">> Project Details</a><br/>
Live Website: <a href="<?php echo $record['website'] ?>" target="_blank"><?php echo $record['website'] ?></a>
<br /><br /><br />
<?php endforeach ?>