func (this *PostRouter) New() { this.TplNames = "post/new.html" if this.CheckActiveRedirect() { return } form := models.PostForm{Locale: this.Locale} form.Lang = this.Locale.Index() slug := this.GetString("topic") if len(slug) > 0 { topic := models.Topic{Slug: slug} topic.Read("Slug") form.Topic = topic.Id this.Data["Topic"] = &topic } models.ListCategories(&form.Categories) models.ListTopics(&form.Topics) this.SetFormSets(&form) }