Skip to content
Snippets Groups Projects
Commit 28ff9318 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

rank base

parent 56ffd2d5
No related branches found
No related tags found
No related merge requests found
...@@ -41,8 +41,6 @@ module Communication::Block::WithHeadingRanks ...@@ -41,8 +41,6 @@ module Communication::Block::WithHeadingRanks
heading_rank_self + 1 heading_rank_self + 1
end end
protected
# If a block is root, it will have level 2 # If a block is root, it will have level 2
# If a block is below a title block, it will have level 3 # If a block is below a title block, it will have level 3
# Not real yet: if a block is below a subtitle, it will have level 4 # Not real yet: if a block is below a subtitle, it will have level 4
...@@ -58,6 +56,8 @@ module Communication::Block::WithHeadingRanks ...@@ -58,6 +56,8 @@ module Communication::Block::WithHeadingRanks
end end
end end
protected
# A block can belong to a title, meaning it is below the title # A block can belong to a title, meaning it is below the title
def block_title def block_title
return if template_title? return if template_title?
......
...@@ -9,6 +9,7 @@ should_render_data = block.data && block.data.present? ...@@ -9,6 +9,7 @@ should_render_data = block.data && block.data.present?
slug: >- slug: >-
<%= block.slug %> <%= block.slug %>
ranks: ranks:
base: <%= block.heading_rank_base %>
<% if block.heading_self? %> <% if block.heading_self? %>
self: <%= block.heading_rank_self %> self: <%= block.heading_rank_self %>
<% end %> <% 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