changing the default layout of pagination links in joomla 1.6 component

Hi,
I am developing an image gallery component.I want to change the default layout of the pagination links in the front end.When i searched about this,the way to do that is, changing the pagination.php in the template/html directory. But when installing the component,how can i select the template and edit its pagination.php file.Is there any other way to achieve this???like editing the css or anything..
How we can override the template pagination layout inside a component?
If anyone know please help me..I am new to joomla..

Views: 297

Replies to This Discussion

Hi

 

The solution can be :

- Add the pagination.php file to a folder in your component .

- In method getPagination in your model, use the code below :

 

function getPagination(){

      if (empty($this->_pagination)) {    

         require_once JPATH_COMPONENT.DS.'helpers'.DS.'pagination.php';

         $this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );

     }

    return $this->_pagination;

}

 

(Note that in this case, my custom pagination.php is placed under helpers folder in my component. You need to change the require_once command  to poin the correct path of your custom pagenavigation.php .

 

Hope this help !

 

Tuan

HI,

Thank you very much...You saved my time............................

RSS

Badge

Loading…

© 2012   Created by Amy Stephen.

Badges  |  Report an Issue  |  Terms of Service