Forums / Cotonti / Support / How to Make new Theme

n0fx
#42319 2016-11-09 20:59
#42304 Macik:
#42302 n0fx:

 found {PAGE_ROW_NUM}

What extension / section / template you are edit?

I used for news plugin

Yes, you can use {PAGE_ROW_NUM}. (Or with direct variable access — {PHP.jj})

Its very good I can use also for different variables :)

how i can change pagination html tags ?

Look at `system/resources.rc.php` → «Pagination» section. You can redefine this variables in your `theme_name.php` file.

This is very good but I also need to change <p class="paging"> ? Actually I want to change to <ul> <li>

Unfortunately, `<p>` wrapper is hard coded in many templates. So to fully change it you need to rearrange whole template.

But you can use a little «hackaround» — add wrapper to `$R['link_pagenav_first']` and `$R['link_pagenav_last']` as listed below (… denotes other paging related code):

$R['link_pagenav_first'] = '</p><ul class="mypaging">…';
$R['link_pagenav_last'] = '…</ul><p class="paging">';

So final rendered HTML whould be:

<p class="paging"></p>
  <ul class="mypaging">
    …you pager code…
  </ul>
<p class="paging"></p>

So just add `p.paging{display:none;}` to your CSS to eliminate unnecessary paragraphs.

This is good idea but  If you are at the first page system dont show {FORUMS_TOPICS_PAGEPREV} thats why its not working. 
I solved like this I changed system/functions.php 4062 line
 

if ($current > 0)

to

if ($current > -1)

and line 4114

if (($current + $perpage) < $entries)

to

if ($entries)


 

Added 5 hours later:

{LIST_ROWCAT_COUNT} always show 0 even I looked last element of category structure. It should show how many pages under the category? How i can solve it? 

Note: I am working with my old database (converted last cotonti version from seditio). When I added page, I can see 1 but it doesnt count my old pages.

https://www.ultima-strike.com
This post was edited by n0fx (2016-11-11 01:46, 7 years ago)