F Farjad Member Jul 9, 2011 #1 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.
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.
R ragtek Guest Jul 9, 2011 #2 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); }
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); }