allow for sections and components in any order on pages
This commit is contained in:
@ -583,13 +583,19 @@ export default function {{.Page.Name}}Page() {
|
||||
{/* Protected content */}
|
||||
{{end}}
|
||||
|
||||
{{range .Page.Sections}}
|
||||
<section className="{{.Class | derefString}}">
|
||||
{{if .Label}}<h2>{{.Label | derefString}}</h2>{{end}}
|
||||
{{range .Components}}
|
||||
{/* Component: {{.Type}} */}
|
||||
{{range .Page.Elements}}
|
||||
{{if .Section}}
|
||||
<section className="{{.Section.Class | derefString}}">
|
||||
{{if .Section.Label}}<h2>{{.Section.Label | derefString}}</h2>{{end}}
|
||||
{{range .Section.Elements}}
|
||||
{{if .Component}}
|
||||
{/* Component: {{.Component.Type}} */}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</section>
|
||||
{{else if .Component}}
|
||||
{/* Component: {{.Component.Type}} */}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</Layout>
|
||||
|
Reference in New Issue
Block a user