News pagecount for new template

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
giapippo
Forum Members
Forum Members
Posts: 176
Joined: Tue Feb 28, 2012 1:24 pm

News pagecount for new template

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News pagecount for new template

Post by Dr.CSS »

Are you trying to count how many pages or how many articles or..?
giapippo
Forum Members
Forum Members
Posts: 176
Joined: Tue Feb 28, 2012 1:24 pm

Re: News pagecount for new template

Post 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
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News pagecount for new template

Post 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}
Post Reply

Return to “Layout and Design (CSS & HTML)”