Previous/Next SEO optimized Url's

2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 7, 2011   (RSS)

By videopixel - March 6, 2011 - edited: March 6, 2011

I have this code:

list($blogRecords, $blogMetaData) = getRecords(array(
'tableName' => 'blog',
'where' => whereRecordNumberInUrl(1) . ' AND status ="1"',
'limit' => '1',
'useSeoUrls' => true,

));
$blogRecord = @$blogRecords[0];

if (!$blogRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}

list($prevRecord, $nextRecord) = getPrevAndNextRecords(array(
'tableName' => 'blog',
'recordNum' => getNumberFromEndOfUrl(),
'where' => 'status = "1"',
'useSeoUrls' => true,
));


and this to show it:

<div>
<?php if (@$nextRecord): ?>
<div><a href="<?php echo $nextRecord['_link'] ?>">Previous blog</a></div>
<?php endif; ?>
<?php if (@$prevRecord): ?>
<div><a href="<?php echo $prevRecord['_link'] ?>">Next blog</a></div>
<?php endif; ?>
</div>



it works like expected but i want SEO urls...
How do i get SEO optimized urls with that code (in folder format) (blog.php/article_title_with number/) ?