[eluser]sparkling tux[/eluser]
The solution seems quite rigid for me. I've solved the same problem this way:
First, I've added new variable
Code:
var $misc_link_params
as it's exactly what original pagination class is missing - the possibility to add miscellaneous parameters to the links.
Next, there's a part where a string is built from these params:
Code:
// Build line of miscellaneous link params - onclick, etc
// But only if there are any
if (!empty($this->misc_link_params))
{
$misc_link_params = FALSE;
if (!is_array($this->misc_link_params))
{
$this->misc_link_params = (array) $this->misc_link_params;
}
foreach($this->misc_link_params as $param_name=>$param_value)
{
$misc_link_params .= $param_name.'="'.$param_value.'" ';
}
$this->misc_link_params = $misc_link_params;
unset($misc_link_params);
}
Finally, I've add some changes to the parts where links are generated, i.e.
Code:
// Render the "First" link
if ($this->cur_page > $this->num_links)
{
$output .= $this->first_tag_open.'<a href="'.$this->base_url.'" '.$this->misc_link_params.'>'.$this->first_link.'</a>'.$this->first_tag_close;
}
Now, I'm able to add
any custom parameters to the pagination links.