title: joomla 2.5! JPagination, Unsure about how to retrieve the value from getLimitBox $option
body: <p>So I've been following this tutorial on <a href="http://docs.joomla.org/Using_JPagination_in_your_component#orderUpIcon.28.29" rel="nofollow noreferrer">JPagination</a> and on the section about <b>with JDatabase</b> it has a variable <code>$option</code> on line 2 <code>"$option.limit"</code>. (It hasn't been referenced anywhere else on the page, I'm unsure on where this value is being declared/initialized).</p>
  
  <pre><code>$db =&amp; JFactory::getDBO();
  $lim    = $mainframe-&gt;getUserStateFromRequest("$option.limit", 'limit', 14, 'int'); //I guess getUserStateFromRequest is for session or different reasons
  $lim0   = JRequest::getVar('limitstart', 0, '', 'int');
  $db-&gt;setQuery('SELECT SQL_CALC_FOUND_ROWS x, y, z FROM jos_content WHERE x',$lim0, $lim);
  $rL=&amp;$db-&gt;loadAssocList();
  if (empty($rL)) {$jAp-&gt;enqueueMessage($db-&gt;getErrorMsg(),'error'); return;} 
  else {
  ////Here the beauty starts
  $db-&gt;setQuery('SELECT FOUND_ROWS();');  //no reloading the query! Just asking for total without limit
  jimport('joomla.html.pagination');
  $pageNav = new JPagination( $db-&gt;loadResult(), $lim0, $lim );
  foreach($rL as $r) {
  //your display code here
  }
  echo $pageNav-&gt;getListFooter(  ); //Displays a nice footer
  </code></pre>
  
  <p>I've had a look around joomla docs on pages such as <a href="http://docs.joomla.org/API16:JPagination/getLimitBox" rel="nofollow noreferrer">this</a> to see if the <code>$option</code> variable is relevant to the <code>limitBox</code>, because the <code>limitbox</code> <img src="https://docs.joomla.org/images/9/97/Limitbox.png" alt="displaybox"> is what is setting the amount things to be displayed. But I haven't had much luck.</p>
  
  <p>Therefore I'm wondering how are you meant to obtain the information from the variable <code>$option</code> and/or the current selection from the <code>LimitBox</code> in JPagination. </p>
  
  <p>Pastebin link to my <a href="http://pastebin.com/2pG0Zz2x" rel="nofollow noreferrer">implementation</a> [expires in 24 hours]</p>