diff --git a/routers/search.go b/routers/search.go index 5ed46eb77..5a04c682f 100644 --- a/routers/search.go +++ b/routers/search.go @@ -32,7 +32,9 @@ func InitESClient() { func Search(ctx *context.Context) { keyword := strings.Trim(ctx.Query("q"), " ") - ctx.Data["keyword"] = keyword + ctx.Data["Keyword"] = keyword + ctx.Data["SortType"] = "newest" + ctx.HTML(200, "explore/search_new") } diff --git a/templates/explore/search_new.tmpl b/templates/explore/search_new.tmpl index a063449e3..a4d2dee3d 100644 --- a/templates/explore/search_new.tmpl +++ b/templates/explore/search_new.tmpl @@ -6,7 +6,7 @@