Skip to content

Commit 08beeb4

Browse files
committed
#635 Only wrap content when needed
1 parent 7b90cc8 commit 08beeb4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/api/LegacyContentApi.scala

+8-5
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,15 @@ class LegacyContentApi {
412412

413413
def wrapBody(context: RenderContext, body: SectionRenderable): SectionRenderable = {
414414
val decs = Decorations.getDecorations(context)
415-
val cbTag = context.getBody
416-
cbTag.setId("content-body")
417-
val citag = new TagState("content-inner").addClass[TagState](decs.getPageLayoutDisplayClass)
418-
val cbtag = cbTag.addClasses[TagState](decs.getContentBodyClasses)
419415

420-
new DivRenderer(citag, new DivRenderer(cbtag, body))
416+
if (decs.isBanner || !decs.isMenuHidden || decs.isContent) {
417+
val cbTag = context.getBody
418+
cbTag.setId("content-body")
419+
val citag = new TagState("content-inner").addClass[TagState](decs.getPageLayoutDisplayClass)
420+
val cbtag = cbTag.addClasses[TagState](decs.getContentBodyClasses)
421+
422+
new DivRenderer(citag, new DivRenderer(cbtag, body))
423+
} else body
421424
}
422425

423426

0 commit comments

Comments
 (0)