It is possible to create a dynamic menu for layouts in PowerPoint based what it is included in the layout name or slide master name.
To do this, you can use the following button command:
special="SkabelonDesign.EasySlideMasters:any"
Parameters
filter="x"
In this parameter, insert a value the dynamic menu should filter by. For example, if you only want layouts that include "Breaker" in the layout name or layouts within a slide master with that name, simply put "Breaker" as the input in this parameter. It is also possible to filter on multiple file extensions. Here you can write for example filter="*.docm|*.docx"
. This example will show all files that ends with .docm OR .docx. The*
means everything before (in this case .docm and .docx) and the |
means OR
. See the example below:
<Button special="SkabelonDesign.EasySlideMasters:any" filter="Breakers" icon="SlideMasterInsertLayout">
<Cmd case="SkabelonDesign.EasySlideMasters:InsertSlide" insertPosition="after"/>
</Button>
or example for file extensions:
<Button special="SkabelonDesign.EasySlideMasters:any" filter="*.docm|*.docx" icon="SlideMasterInsertLayout">
<Cmd case="SkabelonDesign.EasySlideMasters:InsertSlide" insertPosition="after"/>
</Button>
In this example, the command Skabelondesign.EasySlideMasters:InsertSlide
is included with the button, as this is the most typical use case for the dynamic menu. The command has the parameter insertPosition
which can either be "after"
or "before"
for inserting the slide either before or after the current selected slide.
Below, we have a full example of a configuration for Finanstilsynet where the layouts has been filtered both on "Forsider" and "Breakers".
<DynamicMenu label="Indsæt Slide" icon="SlideMasterMasterLayout" size="large" ShowInWord="false" ShowInExcel="false">
<Button special="SkabelonDesign.EasySlideMasters:any" filter="Forsider" icon="SlideMasterInsertLayout">
<Cmd case="SkabelonDesign.EasySlideMasters:InsertSlide" insertPosition="after"/>
</Button>
<Button special="SkabelonDesign.EasySlideMasters:any" filter="Breakers" icon="SlideMasterInsertLayout">
<Cmd case="SkabelonDesign.EasySlideMasters:InsertSlide" insertPosition="after"/>
</Button>
</DynamicMenu>
With this configuration, it results in the dynamic menu below.
With "Forsider" and "Breaker" as filter, the dynamic menu creates a sub-menu for the different variation of the slide masters containing the input, and has the layouts within the given slide master in the sub-menu.
Comments
0 comments
Article is closed for comments.