Page 1 of 1

[SOLVED] Modify template to news module (arrows next page, previous page...)

Posted: Tue Nov 10, 2009 1:01 pm
by Ironhide
Hi

I have question about template to news module. I want modify appearance section where user can skip to next or previous page. For example in default template it's look like this:

 >>

I want replace ASCII arrows with graphic, but in news template I can't do this. Help...

Sorry for my english :).

PS
This is a page on which I worked: http://new.tryumfchrystusa.pl/

Regards

Re: Modify template to news module (arrows next page, previous page...)

Posted: Tue Nov 10, 2009 8:21 pm
by Peciura
Open summary template find smarty variable "{$nextpage}"
replace it with

Code: Select all

{$nextpage|replace:'>><':'><img src="http://new.tryumfchrystusa.pl/NewTCH_gfx/logo.png" style="width:25px;"/><'}

Re: Modify template to news module (arrows next page, previous page...)

Posted: Wed Nov 11, 2009 8:47 am
by Ironhide
Peciura wrote: Open summary template find smarty variable "{$nextpage}"
replace it with

Code: Select all

{$nextpage|replace:'>><':'><img src="http://new.tryumfchrystusa.pl/NewTCH_gfx/logo.png" style="width:25px;"/><'}
I also found a solution to this problem editing the /modules/News/lang/ext/ files. But Your method is good if somebody want modify this arrows from admin panel. Anyway big thx for help :).

Regrads

Re: [SOLVED] Modify template to news module (arrows next page, previous page...)

Posted: Thu Nov 12, 2009 10:05 pm
by Ironhide
Ha! I found another (the best) solution. I used {$nexturl}, {$prevurl}, {$firsturl} and {$lasturl} and added new lines to news template. Example for page navigation:

Code: Select all

{if $pagecount > 1}
  <div id="news_navigation">
  {if $pagenumber > 1}
    <a class="firsturl" href="{$firsturl}"></a>
    <a class="prevurl" href="{$prevurl}"></a>
  {/if}
    <span>{$pagetext} {$pagenumber} {$oftext} {$pagecount}</span>
  {if $pagenumber < $pagecount}
    <a class="lasturl" href="{$lasturl}"></a>
    <a class="nexturl" href="{$nexturl}"></a>
  {/if}
</div>
{/if}
CMS Made Simple rules :)

Regards