Loading...
 
Skip to main content

Features / Usability


tiki-pagination.tpl deprecated? How do I style it then??

posts: 8

I can't seem to find this in the documentation, although I'm new to tikiwiki (love it by the way) and so could be looking in the wrong place!

I'm altering a theme (using tw 2.2) at present and have edited the tiki-pagination.tpl file - but this actually doesn't seem to be included at all since when I examine the html of the actual output, and the template, there is some variance.

From a quick grep on the filesystem, it "appears" that pagination is now provided by lib/smarty_tiki/block_pagination_links.php - but I can't imagine this is the correct file to edit just to restyle the pagination for a template.

Could some kindly person point me in the right direction and perhaps clarify what is going on with tiki-pagination.tpl?

TIA, brancusi

PS. The theme I'm working with is eatlon if that makes a difference.

posts: 4666 Japan

Yes, that's where pagination layout is put together now. What restyling do you want to do? It's not possible to accomplish it using CSS? (Just asking because this hits on an important issue being worked out as we move toward TikiWiki 3.)

-- Gary


posts: 6 France

You can look at the help in lib/smarty_tiki/block.pagination_links.php
There are options you can twik to change the way it is displayed, you can also provide a new class to make CSS changes...

You have also an admin panel for it tiki-admin.php?page=look in the section general layout at the bottom of the page...

What do you want to do ?

Hope it helps


posts: 8

This seems like a retrograde step though doesn't it? I'm finding that to make tikiwiki look "professional" for my purpose, I'm needing to put quite a lot of work into editing templates using the "edit templates" feature of the admin section. This has all been fine - except that the tiki_pagination template is no longer used and the new block pagination one doesn't seem to be admin editable? OK so I can dive in and edit the php - but why no tpl file any more for this feature? Editing the php affects all templates does it not and I only want to change the one I'm working on really.

What I want to do is clean it up - for example the previous area is underlined even when there is no previous link and the same for next - this is poor UI design in my opinion. Also I want to separate it by a few more pixels from the other content with some CSS.

I'm happy I now know which file to edit, just seems a shame that the edit template system can't be used to change it like it can for everything else!

Unless of course I'm missing something?


posts: 4666 Japan

If I understand what you're talking about, it's something that should be corrected in the default function, not left to be fixed by users. I'm looking at page 1 of an article that has 6 pages, and it makes no sense to have |< and < icons (both linking to page 1) when I'm already at the first page. Seems like block.pagination_links.php should have the logic to not display these icons when they make no sense (similarly, the last page should not have > or >| icons, both linking to page 6 when I'm already on page 6). I checked in a trunk installation (to be Tiki 3) and it also has this behavior.

Apart from that, I wonder if CSS can handle any other modifications of the layout that need to be done.

-- Gary

posts: 8

Thanks Gary.

I solved my issue by editing the php file in the end. What I don't understand is why so much of the rest of the core system is available as template to edit, and this pagination isn't. I would argue that it should be editable as a template ... but I am new to tikiwiki and so not familiar with the development direction or how "regulars" like to see the system. As a fresh pair of eyes coming into it I can see a fantastic project with a few idiosyncrasies and this is definately one of them!

Thanks to all for the pointers.