|   |      1 
                                  2
                             我将为此使用视图助手。 在你的视野内  | 
|   |      2 
                                  0
                             
   我有一个视图助手,它有一个方法
    查看助手和前控制器插件的源代码可以在以下位置找到: http://github.com/balupton/balphp/tree/master/trunk/lib/Bal/ 或者直接使用代码: http://github.com/balupton/balphp/blob/master/trunk/lib/Bal/Controller/Plugin/App/Abstract.php#L721 | 
|   |      3 
                                  0
                             使用@arnerie的答案: 在views/helpers/icon.php中,我编写了以下类: 在视图/scripts/index/index.phtml中的视图文件中,然后调用icon对象的方法,如下所示:  | 
|   |      4 
                                  0
                             这是我的版本:  | 
|   | Ben2pop · 正在检索要在查询中使用的ID,Django 7 年前 | 
|   | Steve · Django视图,按用户向访问者显示对象 8 年前 | 
|  | Matt · 页面命中计数器-正在工作,但希望将其限制为每个IP地址 8 年前 | 
|   | Shefali · Django UserCreationForm扩展 8 年前 |