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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Ironhide
New Member
New Member
Posts: 6
Joined: Tue Nov 10, 2009 12:46 pm

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

Post 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
Last edited by Ironhide on Wed Nov 11, 2009 8:49 am, edited 1 time in total.
Peciura

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

Post 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;"/><'}
Ironhide
New Member
New Member
Posts: 6
Joined: Tue Nov 10, 2009 12:46 pm

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

Post 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
Ironhide
New Member
New Member
Posts: 6
Joined: Tue Nov 10, 2009 12:46 pm

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

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

Return to “CMSMS Core”