Solver
Solver

Reputation: 169

How to use hook in WHMCS only on specific page?

If I want to display sidemenu only on affiliates page (affiliates.php) than I'm enclosing code in:

if (App::getCurrentFilename() == 'affiliates'){

}

But how to do same for page index.php?m=somepage ?

Upvotes: 1

Views: 1226

Answers (1)

n8whnp
n8whnp

Reputation: 296

You can use the php builtin variables to get the URI, however if you want to use the application object to fetch a specific argument you could do something like:

$whmcs = App::self();
$module = $whmcs->get_req_var('m');

Upvotes: 2

Related Questions