Allows your dynamic content macro to provide different static macro implementations for different render modes.
Dynamic Content Macros can include style sheets and javascript, allowing the development of rich interactive applications. When your macro is rendered in a web browser this can provide a modern, interactive web experience.
When your macro is rendered to static formats such as PDF, or word, these interactive modes are often undesirable, or technically impossible.
Macro Render Modes allow you to map a render mode to a static content macro. This allows you to provide an implementation of your macro for these formats, that will render safely to static formats.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
{
"modules": {
"dynamicContentMacros": [
{
"renderModes": {
"pdf": {
"url": "/render-map-pdf"
},
"default": {
"url": "/render-map-static"
}
},
"url": "/render-map?pageTitle={page.title}",
"categories": [],
"outputType": "block",
"bodyType": "none",
"aliases": [],
"name": {
"value": "Maps"
},
"key": "dynamic-macro-example"
}
]
}
}
default
Type | |
Description | This render mode will be used for any static render mode that is not mapped directly. This is a catch all mode which allows you to set a default static fallback for all render modes. 1 2 3 4 5 6
An embedded reference to a static macro resource. These macro definitions are a subset of a Static Content Macro, defining only what cannot be inferred from the containing dynamic macro. These embedded static content macros are used to define render mode mappings for your dynamic content macro. Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
url |
|
email
Type | |
Description | This render mode will be used when your macro is being rendered during email rendering, and requesting the EXPORT_VIEW representation. 1 2 3 4 5 6
An embedded reference to a static macro resource. These macro definitions are a subset of a Static Content Macro, defining only what cannot be inferred from the containing dynamic macro. These embedded static content macros are used to define render mode mappings for your dynamic content macro. Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
url |
|
pdf
Type | |
Description | This render mode will be used when your macro is being rendered during "export to pdf". 1 2 3 4 5 6
An embedded reference to a static macro resource. These macro definitions are a subset of a Static Content Macro, defining only what cannot be inferred from the containing dynamic macro. These embedded static content macros are used to define render mode mappings for your dynamic content macro. Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
url |
|
word
Type | |
Description | This render mode will be used when your macro is being rendered during "export to word". 1 2 3 4 5 6
An embedded reference to a static macro resource. These macro definitions are a subset of a Static Content Macro, defining only what cannot be inferred from the containing dynamic macro. These embedded static content macros are used to define render mode mappings for your dynamic content macro. Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
url |
|
Rate this page: