Warning: You are browsing the documentation for PrestaShop 8, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 9. Read the updated version of this page

Learn how to update to the latest version.

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