I need to move the |Next/Prev* buttons, located in the pagenavigation plugin to after the
<jdoc:include type="component" />;
Basically render it anywhere in my templates' index.php?
Any ideas as to how I can achieve this?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.Sign up to join this community
Assuming you have created a template override of the article view, then you have to modify a few things at
Declare a global variable as below
global $myPageNavigation; $myPageNavigation = $this->item->pagination;
Remove all the snippets that render the pagination which are associated to
Then place the code below anywhere in your
That is't, just a POC though.
First, in your component's view, you need to remove the snippet that render the pagination and also set three JInput values which are required for your pagination module.
$jinput = JFactory::getApplication()->input; $jinput->set( 'total', $total); $jinput->set( 'limitstart', $limitstart); $jinput->set( 'count', $count);
Then implement a module to render a pagination something like below,
$jinput = JFactory::getApplication()->input; $total = $jinput->getInt( 'total', 0); $limitstart = $jinput->getInt( 'limitstart', 0); $count = $jinput->getInt( 'count', 10); jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $count);
and you can echo the pagination in your module's view something like
echo $pageNav->getResultsCounter(); echo $pageNav->getPagesLinks(); echo $pageNav->getPagesCounter();
Finally, assign your module to any position in your template which must also be associated with your component's menu.