Hi there!
I've built my website(s) with Serendipity. Generally I only have one entry on several pages, except for one. This single page I use to publish articles every now and then.
Now, below the bottom entry on a page there is a counter displaying number of pages and entries (for example, 'page 1 of 1, totaling 1 entries'). Is it possible to remove this counter on the webpages with only one entry, but to keep it on the page that is edited regularly?
This is the website:
http://www.woordvoorwoord.com
And this is the page in which I publish articles regularly:
http://www.woordvoorwoord.com/serendipi ... -Portfolio
Thanks very much!
Rogier.
Removing page counter below entries
-
kingofsicily
- Regular
- Posts: 30
- Joined: Thu Jul 29, 2010 4:12 pm
- Location: Arnhem, Netherlands
Re: Removing page counter below entries
Yes. Say Smarty to count the pages in the entries.tpl pagination section by using
Code: Select all
{if $footer_totalPages > 1}
show serendipity pagination
{/if}Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
kingofsicily
- Regular
- Posts: 30
- Joined: Thu Jul 29, 2010 4:12 pm
- Location: Arnhem, Netherlands
Re: Removing page counter below entries
Ah yes, thank you for your quick reply, Ian. I was thinking it had to be something like that. Unfortunately
, my programming skills are only quite basic, I'm afraid. I believe I have found the pagination section in the entries.tpl, but now I'm not sure where I have to copy/paste your code:
There is a section in the entries.tpl (at the bottom) that goes like this:
Should your code be pasted somewhere in here and, if so, where?
Could you help me with that?
Thanks again!
Rogier.
Code: Select all
{if $footer_totalPages > 1}
show serendipity pagination
{/if}Code: Select all
{if $template_option.show_pagination == 'true' && $footer_totalPages > 1}
<div class="pagination">
{eval var=$footer_currentPage-3 assign="paginationStartPage"}
{if $footer_currentPage+3 > $footer_totalPages}
{eval var=$footer_totalPages-6 assign="paginationStartPage"}
{/if}
{if $paginationStartPage <= 0}
{assign var="paginationStartPage" value="1"}
{/if}
{if $footer_prev_page}
<a title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><span class="pagearrow">◄</span></a>
{/if}
{if $paginationStartPage > 1}
<a href="{'1'|string_format:$footer_pageLink}">1</a>
{/if}
{if $paginationStartPage > 2}
…
{/if}
{section name=i start=$paginationStartPage loop=$footer_totalPages+1 max=7}
{if $smarty.section.i.index != $footer_currentPage}
<a href="{$smarty.section.i.index|string_format:$footer_pageLink}">{$smarty.section.i.index}</a>
{else}
<span id="thispage">{$smarty.section.i.index}</span>
{/if}
{/section}
{if $smarty.section.i.index < $footer_totalPages}
…
{/if}
{if $smarty.section.i.index <= $footer_totalPages}
<a href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a>
{/if}
{if $footer_next_page}
<a title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><span class="pagearrow">►</span></a>
{/if}
</div>
{/if}Could you help me with that?
Thanks again!
Rogier.
Re: Removing page counter below entries
No. The pasted code already has it set, as your are using bulletproof, but not using bulletproofs own pagination defined in the templates config. Set it here:kingofsicily wrote:Should your code be pasted somewhere in here and, if so, where?
Code: Select all
{if $footer_totalPages > 1}
<div class='serendipity_pageFooter' style="text-align: center">
..."big block depending serendipity and bulletproof pagination"...
{serendipity_hookPlugin hook="entries_footer"}
</div>
{/if}
<!-- ENTRIES END -->
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
kingofsicily
- Regular
- Posts: 30
- Joined: Thu Jul 29, 2010 4:12 pm
- Location: Arnhem, Netherlands
Re: Removing page counter below entries
Thank you very much! I did it
.
(Now let's tackle the other problem...)
(Now let's tackle the other problem...)
-
gavindegraw1
- Posts: 1
- Joined: Thu Dec 15, 2011 2:39 pm