Message-ID: <1638857990.4004.1485856271272.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4003_494278083.1485856271272" ------=_Part_4003_494278083.1485856271272 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Default view templates

Default view templates

Content view uses = default templates to render content unless custom view rules are used.

Those templates can be customized by means of container- and siteaccess-= aware parameters.

Overriding the default template for common view types

Templates for the most common view types (content/full, line, embed, or = block) can be customized by setting one the ezplatform.default.c= ontent_view_templates variables:

Controller ViewType Parameter Default value
ez_content:viewAction= full ezplatform.default_view_templates.content.= full "EzPublishCoreBundle:default:content/full.= html.twig"
ez_content:viewAction<= /span> line ezplatform.default_view_templates.content.= line "EzPublishCoreBundle:default:content/line.= html.twig"
ez_content:viewAction<= /span> embed ezplatform.default_view_temp= lates.content.embed "EzPublishCoreBundle:default= :content/embed.html.twig"
ez_page:viewAction n/a ezplatform.default_view_temp= lates.block "EzPublishCoreBundle:default= :block/block.html.twig"

Example

Add this configuration to app/config/config.yml to use app/Resources/content/view/full.html.twig as the default template = when viewing Content with the full view type:

=20
parameters:
    ezplatform.default_view_templates.content.full: "content/view/full.html=
.twig"
=20

Customizing= the default controller

The controller used to render content by default can also be changed. Th= e ezsettings.default.content_view_defaults container para= meter contains a hash that defines how content is rendered by default. It c= ontains a set of classic content view = rules for the common view types. This hash can be redefined to whatever= suits your requirements, including custom controllers, or even matchers.

 

Related topics:
------=_Part_4003_494278083.1485856271272--