Post by stonehinged » Tue Jul 24, 2012 4:01 am

I have added fields to my database for category title and am looking for help with making this title unique on each of the paginated result pages except for Page 1.

Page 1 = Gemstone Jewelry (the text I enter in admin for the category)
Page 2 = Gemstone Jewelry - Page 2
Page 3 = Gemstone Jewelry - Page 3
etc.

I'm using 1.5.2.1

Thanks.

STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/


User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:10 am
Location - US

Newbie

Posts

Joined
Fri Mar 23, 2012 12:52 pm

Post by oscprofessionals » Tue Jul 24, 2012 1:06 pm

This code in library pagination class needs to be modified.
if ($num_pages > 1) {
if ($num_pages <= $num_links) {
$start = 1;
$end = $num_pages;
} else {
$start = $page - floor($num_links / 2);
$end = $page + floor($num_links / 2);

if ($start < 1) {
$end += abs($start) + 1;
$start = 1;
}

if ($end > $num_pages) {
$start -= ($end - $num_pages);
$end = $num_pages;
}
}

if ($start > 1) {
$output .= ' .... ';
}

for ($i = $start; $i <= $end; $i++) {
if ($page == $i) {
$output .= ' <b>' . $i . '</b> ';
} else {
$output .= ' <a href="' . str_replace('{page}', $i, $this->url) . '">' . $i . '</a> ';
}
}

if ($end < $num_pages) {
$output .= ' .... ';
}
}

Team of e-commerce experts.

oscprofessionals


New member

Posts

Joined
Mon Jul 16, 2012 12:14 am
Location - Nagpur, India

Post by stonehinged » Wed Jul 25, 2012 3:44 am

Thanks to all who responded or messaged. I have managed to sort out the functionality I was looking for. Thanks!

STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/


User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:10 am
Location - US
Who is online

Users browsing this forum: No registered users and 9 guests