Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.
You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page
Grid component allows developer to configure Empty state to make empty grid look more appealing for user.
By default, when Grid is empty user sees it as:
Unfortunately, it’s not very engaging, so let’s create Empty state for it! There are a few steps you have to follow:
src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/EmptyState
directory, so Grid component can locate it.supplier
then template name must be supplier.html.twig
).In Empty state template you can put whatever you want to: an image, some helpful text, a form … but it’s a good practice to describe what data grid displays. See Suppliers grid empty state as an example below.
_default.html.twig
template that can be found at src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Blocks/EmptyState
.