Skip to content
Snippets Groups Projects
Commit b38fe4cd authored by alexisben's avatar alexisben
Browse files

Fix block page with legacy

parent e6bafe1f
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,10 @@ class Communication::Block::Template::Page < Communication::Block::Template
@main_page ||= page(data['page_id'])
end
def show_main_description
data['show_main_description'] || false
end
def show_description
data['show_description'] || false
end
......
......@@ -28,6 +28,16 @@
</div>
<div class="col-md-6">
<h2 class="h3">Options d'affichage</h2>
<div class="form-check">
<input v-model="data.show_main_description"
class="form-check-input boolean optional"
id="show_main_description"
type="checkbox">
<label class="form-check-label boolean optional"
for="show_main_description">
Afficher la description courte de la page principale
</label>
</div>
<div class="form-check">
<input v-model="data.show_description"
class="form-check-input boolean optional"
......
<% if block.template.main_page %>
page: <%= block.template.main_page.generated_path %>
<% end %>
show_main_description: <%= block.template.show_main_description %>
show_descriptions: <%= block.template.show_description %>
show_images: <%= block.template.show_image %>
pages:
<% block.template.selected_pages.each do |element| %>
- slug: <%= element.generated_path %>
show_description: <%= block.template.show_description %>
show_image: <%= block.template.show_image %>
- page: <%= element.generated_path %>
slug: <%= element.generated_path %>
<% end %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment