mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FEATURE: allows to to style published page with themes/plugins (#9570)
This commit is contained in:
@ -15,6 +15,18 @@ class PublishedPagesController < ApplicationController
|
||||
guardian.ensure_can_see!(pp.topic)
|
||||
@topic = pp.topic
|
||||
@canonical_url = @topic.url
|
||||
|
||||
@body_classes = Set.new([
|
||||
'published-page',
|
||||
params[:slug],
|
||||
"topic-#{@topic.id}",
|
||||
@topic.tags.pluck(:name)
|
||||
].flatten.compact)
|
||||
|
||||
if @topic.category
|
||||
@body_classes << @topic.category.slug
|
||||
end
|
||||
|
||||
render layout: 'publish'
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user