variable as xenoptions

timothy259856

Active member
qOIiqkk.png


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:

FTF72S5.png


same total att

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