Page 1 of 1

News pagecount for new template

Posted: Mon Oct 06, 2014 3:10 pm
by giapippo
hello
I am creating a site based on the news module
I have to turn the page counter but unfortunately I can not make it work

news summary template

{foreach from=$items item=entry}

{if $entry->postdate}{/if}

<div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
<!-- Video Box Start -->
<div class="videobox2">
<figure>
<!-- Video Thumbnail Start -->
<a href="{$entry->moreurl}">
<img src="{$entry->file_location}/{$entry->fieldsbyname.immagine->value}" alt="" />
</a>
<!-- Video Thumbnail End -->
<!-- Video Info Start -->
<div class="vidopts">

<div class="clearfix"></div>
</div>
<!-- Video Info End -->
</figure>
<!-- Video Title Start -->
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}"><h4>{$entry->title|cms_escape}</h4></a>
<!-- Video Title End -->
</div>
<!-- Video Box End -->
</div>



{/foreach}


<!-- End News Display Template -->






template page counter string

<!-- Pagination Start -->
<ul class="pagination">
<li><a href="#"><i class="fa fa-angle-left"></i></a></li>
<li><a href="#">1</a></li>
<li class="disabled"><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li class="active"><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#"><i class="fa fa-angle-right"></i></a></li>
</ul>
<div class="clearfix"></div>
<!-- Pagination End -->


thanks for help

Re: News pagecount for new template

Posted: Mon Oct 06, 2014 4:44 pm
by Dr.CSS
Are you trying to count how many pages or how many articles or..?

Re: News pagecount for new template

Posted: Tue Oct 07, 2014 7:53 am
by giapippo
hallo
the web site is this

http://www.teneriecoccolosi.it/

I would like to show 12 news per page but do not know how to use the system paging

Re: News pagecount for new template

Posted: Tue Oct 07, 2014 8:03 am
by velden
The sample News summary template has this code for pagination:

Code: Select all

{if $pagecount > 1}
  <p>
{if $pagenumber > 1}
{$firstpage}&nbsp;{$prevpage}&nbsp;
{/if}
{$pagetext}&nbsp;{$pagenumber}&nbsp;{$oftext}&nbsp;{$pagecount}
{if $pagenumber < $pagecount}
&nbsp;{$nextpage}&nbsp;{$lastpage}
{/if}
</p>
{/if}
Change it so suit your needs.

From the News help:
(optional) pagelimit="100000" - Maximum number of items to display (per page). If this parameter is not supplied all matching items will be displayed. If it is, and there are more items available than specified in the parameter, text and links will be supplied to allow scrolling through the results
So {news pagelimit="12"} or perhaps {news pagelimit=12}