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

variable as xenoptions

#1


PHP:
    public static function totalatt(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
    {
        $db = XenForo_Application::get('db');
        $totalatt = $db->fetchOne("
        SELECT count(*)
        FROM xf_attachment
        ");
        $preparedOption['option_value'] = $totalatt;
     
        return XenForo_ViewAdmin_Helper_Option::renderOptionTemplateInternal(
        'option_list_option_textbox',
        $view, $fieldPrefix, $preparedOption, $canEdit
        );
     
    }
Result:



same total att

but i cant add {$xenOptions.testatt} to any templates