• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

template_hook & XenForo_Input -- get page #

In the template hook: thread_view_form_before ... I can't for the life of me figure out how I can get the page number out of the topic. I only want the template hook to be modified on page 1, and not page 2+.

Any help will be appreciated.


 public static function templateHook($name, &$contents, array $params, XenForo_Template_Abstract $template)

        if ($name == 'thread_view_form_before'){
            $params2 = $template->getParam('page');
            die('page' . $params2);