template_hook & XenForo_Input -- get page #

Farjad

Member
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.
 
PHP:
 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);
        }

;)
 
Top Bottom