PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page

CustomContentType

Type is used to add any content at any position of the form, rather than the actual field.

Type options

Option Type Default value Description

Code example

$builder->add('seo_preview', CustomContentType::class, [
    'label' => $this->trans('SEO preview', 'Admin.Global'),
    'help' => $this->trans('Here is a preview of how your page will appear in search engine results.', 'Admin.Global'),
    'template' => '@PrestaShop/Admin/Improve/Design/Cms/Blocks/seo_preview.html.twig',
    'data' => [
        'cms_url' => $options['cms_preview_url'],
    ],
])

Preview example

CustomContentType rendered in form example