how to get this information into pagination overri

  • Posts: 36
  • Thank you received: 0
10 years 6 months ago #156427

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.3
-- Joomla version -- : 3.2.3
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

In pagination.php is this code for item_active

if($item->base>0)
        return "<a class=\"".$class."\" title=\"".$item->text."\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.
        ".limitstart".
        $this->hikaSuffix.
        ".value=".$item->base."; document.adminForm".$this->hikaSuffix.$this->form
        .".submit();return false;\">".$item->text."</a>";
    else
        return "<a class=\"".$class."\" title=\"".$item->text."\" onclick=\"javascript: document.adminForm".$this->hikaSuffix.$this->form.
        ".limitstart".$this->hikaSuffix
        .".value=0; document.adminForm".$this->hikaSuffix.$this->form
        .".submit();return false;\">".$item->text."</a>";

If I want to override this function for structural purpos I have the problem, that I don't have $this in the override. How can I access the needed information in the override?

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
10 years 6 months ago #156438

The joomla pagination overrides are not meant to be able to handle these unfortunately.
I don't have a clean solution for that.
You should however be able to have your override without the variables in the $this.
For example, for the name of the form, you should be able to retrieve it in the JS directly with something like that:
this.form.submit();
and for the limitstart, you should be able to get it with some jquery js for example:

$('[name^=limitstart]')
But the best would be to just set some specific ids if you want to the limitstart elements with your override and then use these ids when you need them.

Please Log in or Create an account to join the conversation.

Time to create page: 0.037 seconds
Powered by Kunena Forum