func (c Category) Index(category *models.Category) revel.Result { title := "栏目管理--GoCMS管理系统" if UserID, ok := c.Session["UserID"]; ok { UserID, err := strconv.ParseInt(UserID, 10, 64) if err != nil { revel.WARN.Println(err) } admin := new(models.Admin) admin_info := admin.GetById(UserID) categorys := category.GetCateGoryHtml(admin_info) c.Render(title, categorys) } else { c.Render(title) } return c.RenderTemplate("Content/Category/Index.html") }