how to modify the look and feel of pagination???

dyvel

New Member
How or where or which file do I need to hack in order to modify the look and feel of the pagination function?

Thanks,
Daniel
 
Ah, well, ya see, the rule of thumb is ... if you can't find it, you might didn't ought to be hacking on it.

But what you want is probably in the fabrikPageNav class, in functions_fabrik.php.

-- hugh
 
Thanks, but fabrikPageNav class doesn't seem to contain the whole pagination output. Do you have an idea about where to look for the rest???
 
You can change the look and feel of nav using css.

In your template add the following line of code to see what the classes are for the nav:

Code:
<?php var_dump($this->nav); ?>

in addition the .pagenav css class will alter the table as well. Here is an example of one I added to the table class:
Code:
.fabrikTable, .filtertable, .pagenav{ 
	margin:5px; 
	border-collapse:collapse; 
	border:1px solid #634851!important;
	background-color:#fff2c1; 
	color:#6D4F70; 
	font-weight:bold; 
}
 
it's not css styling I'm after - I'm experienced in css, but it's some elements I wish to remove. Ie the text and html around "Display#", dropdown and page x of y
 
Yes, that'll still be in fabrikPageNav class, in functions_fabrik.php. Our class extends the Joomla mosPageNav class, and we use getListFooter() to build the pagenav. So you can override the getListFooter() from Joomla's pageNavigation.php in our class file. You should just be able to copy the existing function from Joomla, paste it into our class, and tweak it appropriately.

Note that this will of course change all table footers that Fabrik prints, on both front and back end.

-- hugh
 
would it be possible to copy the class to the template file instead, only changine the pagination for the specific template?
 
Nope, I don't think so. I think the template gets eval'ed at the end of all the other processing, and the table footers are constructed much earlier on. So nothing you defined in the template PHP would be available when the footers are built.

Although ... you might be able to create your own class extension, and rebuild the $nav stuff in the template, overwriting the default. But I have a sneaking suspicion this wouldn't work, although I can't quite put my finger on why.

-- hugh
 
Actually the nav is called in from the template, and you could just call in your own modified version as Hugh suggested.
You could do a preg_replace on the nav code, save the result and render it in the template.

I think that might work.

Andre
 
ok, thanks

Will take a look at it.

The thing is, I need a pagination like this:
1 2 3 4 Next page

In other words, something really simple. I'm trying to complete a template for a module to display job postings and almost everyting is in place except styling and the pagination.
 
Daniel said:
ok, thanks

Will take a look at it.

The thing is, I need a pagination like this:
1 2 3 4 Next page

In other words, something really simple. I'm trying to complete a template for a module to display job postings and almost everyting is in place except styling and the pagination.

Daniel: If you get that code, could you post it here? I am also looking for such a thing... THanks
 
Hi !
If you want to hide some elements of the pagination:
1) Open the file template.css of your template
2) Copy and paste the following rows:

a) To hide the display num:
div.limit{
display:none;
}
b) To hide the page counter:
div.counter{
display:none;
}
c) To hide the figures of the pagination:
.pagenav{
display:none;
}

I hope this will be helpful !
Cheers, and sorry if there is some bad english !!
 
Back
Top