getSortedSections(false, false, SectionLanguageMode::AllLanguages) as $section) { $type = $section->getSettings(); if ($type->type === ISectionType::TYPE_TITLE) { $content = ($draft->sections[$section->sectionId] ?? ''); $htmlId = 'sections_' . $type->id; echo '
'; echo ''; echo '
' . Html::encode($content); echo '
'; } elseif ($type->type === ISectionType::TYPE_TEXT_SIMPLE) { /** @var TextSimple $simpleSection */ $simpleSection = $section->getSectionType(); $htmlId = 'sections_' . $type->id; echo '
'; echo ''; echo '
'; $paragraphs = []; foreach ($section->getTextParagraphLines() as $para) { $paragraphs[] = $draft->paragraphs[$section->sectionId . '_' . $para->paragraphWithLineSplit]->text; } echo implode("\n", $paragraphs); echo '
'; } else { // @TODO Support drafts echo $section->getSectionType()->getSimple(false); } }