Using pagination with another variable in the URL

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
canhcam1023
Registered User
Posts: 1
Joined: Mon May 07, 2018 3:58 pm

Using pagination with another variable in the URL

Post by canhcam1023 » Mon May 07, 2018 4:00 pm

I am trying to us the new pagination method but for the pagination URL I'm unsure how to code the URL if it has a _GET variable included.

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 1626
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Using pagination with another variable in the URL

Post by kinerity » Mon May 07, 2018 4:13 pm

Superglobals are disabled in phpBB by default. Can you show us the code you have so far?
Kailey Truscott - Community Team

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2813
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Using pagination with another variable in the URL

Post by kasimi » Mon May 07, 2018 8:34 pm

You can add additional parameters to the $base_url:

Code: Select all

// For a route:
$base_url = $controller_helper->route('my_route', ['another' => 'parameter']);

// Otherwise:
$base_url = append_sid($root_path . 'index.' . $php_ext, ['another' => 'parameter']);

$pagination->generate_template_pagination($base_url, ...);

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 7 guests