How do I get the Joomla-3.x pagination prev/next link, using the getData() function, in the content plugin with the onContentPrepare event?

What is the work of $limitstart here: onContentPrepare($context, &$article, &$params, $limitstart)


I haven't looked close enough to verify, but you might want to have a look at:


print_r that bad-boy to see what's in it. I believe that's going to contain the links you're looking for.

onContentPrepare $limitstart designated which page of a paginated article to start on. If you've used pagebreaks, this is used. Convenient if you want your content plugin to run on only certain pages.

  • I want to get the pagination in the $view == 'category'. For example, if there is more pages then set metadata. Else in the first page set metadata. Also get the prev/next page. $this->pagination->getData() works in the article component category view. How to get this from the content plugin.
    – Salehin
    Apr 26 '16 at 19:45
  • That makes things tougher, because the content plugins work on each individual article, not on the category itself (maybe in the category description though...) I'll have a closer look at this tonight. I'm sure something can be found.
    – Michael
    Apr 27 '16 at 20:06

The arguments name is "page" not "limitstart". From the docs it mans: "An integer that determines the "page" of the content that is to be generated. Note that in the context of views that might not generate HTML output, a page is a reasonably abstract concept that depends on the context."


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.