1. 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 #

Discussion in 'XenForo Development Discussions' started by Farjad, Jul 9, 2011.

  1. Farjad

    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.
  2. ragtek

    ragtek Guest

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

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

    Farjad Member

    thanks a lot, ragtek. I really appreciate your help.

Share This Page