Exemple #1
0
func (c *MainController) Get() {
	c.Data["IsHome"] = true
	c.TplNames = "home.html"
	var err error
	c.Data["blogs"], err = models.GetAllTopics()
	if err != nil {
		beego.Error(err)
	}
	c.Data["IsLogin"] = checkAccount(c.Ctx)
}
Exemple #2
0
func (this *TopicController) Get() {
	this.Data["IsTopic"] = true
	this.Data["IsLogin"] = checkAccount(this.Ctx)
	var err error
	this.Data["Topics"], err = models.GetAllTopics()
	if err != nil {
		beego.Error(err)
	}
	this.TplNames = "topic.html"
}