mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 16:48:03 +08:00
DEV: allow themes to render their own custom homepage (#26291)
This PR adds a theme modifier and route so that custom themes can opt to show their own homepage. See PR description for example usage.
This commit is contained in:
@ -559,7 +559,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def current_homepage
|
||||
current_user&.user_option&.homepage || SiteSetting.anonymous_homepage
|
||||
current_user&.user_option&.homepage || HomepageHelper.resolve(request, current_user)
|
||||
end
|
||||
|
||||
def build_plugin_html(name)
|
||||
@ -758,6 +758,10 @@ module ApplicationHelper
|
||||
user&.display_name
|
||||
end
|
||||
|
||||
def anonymous_top_menu_items
|
||||
Discourse.anonymous_top_menu_items.map(&:to_s)
|
||||
end
|
||||
|
||||
def authentication_data
|
||||
return @authentication_data if defined?(@authentication_data)
|
||||
|
||||
|
Reference in New Issue
Block a user