Link to detail page - only linking to first record
2 posts by 2 authors in: Forums > CMS Builder
Last Post: December 5, 2016 (RSS)
Hi guys,
All record links on my list page are only linking to the first record in the list and not to each individual record.
I'm using this at the top:
// load records from 'blog'
list($blogRecords, $blogMetaData) = getRecords(array(
'tableName' => 'blog',
'perPage' => '4',
'loadUploads' => true,
'allowSearch' => false,
));
And the standard code for the rest:
<?php foreach ($blogRecords as $record): ?>
<?php foreach ($record['image'] as $index => $upload): ?>
<?php if (!@$counter++): ?>
<img src="<?php echo htmlencode($upload['urlPath']) ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" class="img-responsive"/>
<?php endif ?>
<?php endforeach ?>
</blockquote>
<h3><?php echo htmlencode($record['title']) ?></h3>
<?php echo $record['content']; ?><br/>
_link : <a href="<?php echo $record['_link'] ?>"> Read more >></a><br/>
<hr/>
<?php endforeach ?>
<?php if (!$blogRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
Any ideas what could be causing this bug?
By ross - December 5, 2016
Hi there.
Thanks for posting.
At first glance, I don't see a problem.
Could you post a full copy of this page as an attachment? Could you also post a copy of your blog section schema?
Thanks.
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/