Hello,
I am using Zenphoto version 1.4.2.1 [9264] (Official Build) with zpFocus_ v1.4.2.
I was wondering how to control the number of albums that are returned on the search results page.
It was obvious how to change the code for pages and news results, but I am not able to figure out what to change for the albums and or images. I have experimented many ways without success.
In admin I have the number of albums set per page as 6, and my first thought was that is where it is decided.
I would like to restrict the number of results with the Show More Results link appearing when the results are more than the number I choose to display. Which is what happens with the pages and news.
Following is the code used in my search.php page:
<?php if (getNumAlbums() != 0) { ?>
<div class="subalbum-wrap">
<h4 class="blockhead"><span><?php echo gettext('Album Search Results'); ?> (<?php echo getNumAlbums(); ?>)</span></h4>
<?php $x=1; while (next_album()): $c++;
if( $odd = $x%2 ) {
$css = 'goleft';
} else {
$css = 'goright';
} ?>
<li class="<?php echo $css; ?>">
<h4>" title="<?php echo gettext('View Album:'); ?> <?php echo getBareAlbumTitle();?>"><?php echo truncate_string(getBareAlbumTitle(),25,'...'); ?></h4>
" title="<?php echo gettext('View Album:'); ?> <?php echo getBareAlbumTitle();?>"><?php printCustomAlbumThumbImage(getBareAlbumTitle(),160); ?>
<span class="front-date"><?php printAlbumDate(); ?></span>
<p class="front-desc">
<?php echo truncate_string(getAlbumDesc(), 175); ?>
" title="<?php echo gettext('View album:'); ?> <?php echo getBareAlbumTitle();?>">»
</p>
<?php $x=$x+1; endwhile; ?>
</div>
<?php } ?>
Thank-you!
Comments
You would need to mark as hidden the ones past your desired limit and use the link to show them.
Presumably you would want to show these images/albums in rows, so your computation on when to hide should be an even multiple of what will fit in a row.
How this fits in the specific theme is on you as I am not familiar with the theme.