Shared Partials¶
Sometimes you want to reuse Partials from your extension in your Content Block
template. This is done by extending the partialRootPaths
of the
default Content Block FLUIDTEMPLATE
definition.
For every Content Block¶
lib.contentBlock {
partialRootPaths {
100 = EXT:site_package/Resources/Private/Partials/ContentElements/
}
}
Copied!
For a specific Content Block¶
tt_content.myvendor_mycontentblockname {
partialRootPaths {
100 = EXT:my_sitepackage/Resources/Private/Partials/ContentElements/
}
}
Copied!
Note
Content Blocks reserves indexes below 100
.
For all EditorPreview.html templates¶
Sometimes it is needed to include partials from another source to be used in the preview. For this some Page TsConfig is needed. This can be included in the page.tsconfig file inside your extension, which is automatically loaded. It is also possible to provide additional layout root paths.
tx_content_blocks {
view {
layoutRootPaths {
10 = EXT:my_extension/Resources/Private/Layouts/
}
partialRootPaths {
10 = EXT:my_extension/Resources/Private/Partials/
}
}
}
Copied!