2

I am updating the Link Vault add-on to paginate the report results in the control panel. For some reason, the link generated for the page 1 link always leaves off the defined suffix of query string parameters. Has anyone experienced this before? How do I fix it?

I verified that the $query_string_suffix variable is populated correctly. It must be since all the other pagination links are fine. It is just the page 1 or "first" link that is wrong. Why would all the others be fine?

// Setup the pagination links
$page_config = array(
    'base_url'          => $this->base_url.AMP.'method=reports',
    'total_rows'        => count($complete_report_data),
    'per_page'          => $data['limit'],
    'page_query_string' => true,
    'suffix'            => $query_string_suffix
);

Edit: I found this bug report from EE 2.5.5 but the known solution doesn't seem to describe code that is still located in the Pagination library.

0

Don't add the module?

$base_url = 'C=addons_modules' . AMP . 'M=show_module_cp' . AMP . 'module=scheduled_trigger';
$root_url = BASE . AMP . $base_url;
$method_url = $root_url . AMP . 'method=';

Copied from Scheduled trigger, settings form the syntax changed slightly.

Edit: see also module tutorial, pagination is mentioned
http://ellislab.com/expressionengine/user-guide/development/module_tutorial.html

Note to self: control panel links can/should be made with cp_url() (EE 2.8+)
http://ellislab.com/expressionengine/user-guide/development/cp_styles/index.html#cp-internal-links

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.