Returns the lookup that maps each layout role used by placeholder slides
(such as section) to a template layout and the placeholders it fills.
Details
Each role is a list with:
layout,master: the template layout to add the slide on.labels: field name to placeholder label (ph_labelinofficer::layout_properties()), and/ortypes: field name to placeholder type (typeinofficer::layout_properties(), e.g."title","body"). A label wins over a type for the same field.fallbacks: field name to another field. Text for a field the layout has no placeholder for is added to the other field, before its own text. The defaultsectionrole (the "Section Header" layout has a title and a text box, but no subtitle) sendssubtitletotext, so a speclayout written for a template with a subtitle still renders without losing text.
Overrides are merged per role, and labels, types and fallbacks per
field, so changing one layout name or one label keeps everything else. New
roles can be added the same way.
Examples
placeholder_layouts()$section
#> $layout
#> [1] "Section Header"
#>
#> $master
#> [1] "Office Theme"
#>
#> $types
#> $types$title
#> [1] "title"
#>
#> $types$text
#> [1] "body"
#>
#>
#> $fallbacks
#> $fallbacks$subtitle
#> [1] "text"
#>
#>
# A template whose divider layout is called "Chapter divider"
placeholder_layouts(list(section = list(layout = "Chapter divider")))$section$layout
#> [1] "Chapter divider"