Looking at the Brand A-Z page on Webpricecheck
http://www.webpricecheck.co.uk/brand/
You have it so it shows 20 results and then a "More..." button for each letter.
I've checked all my templates and files and can't see anything like that anywhere by default.
Could you possibly share the code for that page, so I can put it into one of my sites please.
That's just what I needed, perfect, I can work that into my modified a-z page now, thanks muchly... :)
A few months later....
I got this working as intended perfectly on the site I was working on. Thanks.
But...
Is there a way to make it so that when you click the "more" button, that it will show the next X amount of results and show another "more" option?
Essentially I want it to load the next few result a few at a time, rather than once you press more the first time, it then loading the entire rest of that letters results, as that feels a little like info overload for my visitors, with some letters having over 1000 brands.
Really appreciate any guidance on this.
Hello tommo,
It's a relatively recent thread so I wondered if you had come across Split A-Z into subpages (node 6121) - perhaps combined with the above of course - let me know if you'd still like to make changes to per-letter "More..." functionality and I'll point you in the right direction...
Cheers,
David.
--
PriceTapestry.com
Hi,
Sure - if you edit html/atoz.php and look for the following code beginning at line 22:
<?php foreach($atoz_items as $atoz_item): ?>
<li>
...and REPLACE with:
<?php foreach($atoz_items as $k => $atoz_item): ?>
<li <?php print ($k>=20?"class='pt_az_hd_".$atoz_letter."' style='display:none;'":""); ?> >
And then the following code at line 42:
<?php endforeach; ?>
...and REPLACE with:
<?php endforeach; ?>
<?php
if ($k>=20)
{
print "<li id='pt_az_rm_".$atoz_letter."' style='cursor:pointer;color:#008CBA' onclick='JavaScript:$(\".pt_az_hd_".$atoz_letter."\").show();$(\"#pt_az_rm_".$atoz_letter."\").hide();'><strong>More...</strong></li>";
}
?>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com