mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:14:12 +08:00
Allow sites to bootstrap the error page.
This will display working dropdowns and such even if the page is a 404.
This commit is contained in:
@ -596,6 +596,11 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def build_not_found_page(status = 404, layout = false)
|
||||
if SiteSetting.bootstrap_error_pages?
|
||||
preload_json
|
||||
layout = 'application' if layout == 'no_ember'
|
||||
end
|
||||
|
||||
category_topic_ids = Category.pluck(:topic_id).compact
|
||||
@container_class = "wrap not-found-container"
|
||||
@top_viewed = TopicQuery.new(nil, except_topic_ids: category_topic_ids).list_top_for("monthly").topics.first(10)
|
||||
|
Reference in New Issue
Block a user