- Posts: 36
- Thank you received: 0
how to get this information into pagination overri
12 years 4 months ago #156427
by svanschu
how to get this information into pagination overri was created by svanschu
-- 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 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?
-- 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
Code:
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.
12 years 4 months ago #156438
by nicolas
Replied by nicolas on topic how to get this information into pagination overri
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:
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.
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:
Code:
$('[name^=limitstart]')
Please Log in or Create an account to join the conversation.
Time to create page: 0.177 seconds