{"id":15615,"date":"2018-04-24T14:42:42","date_gmt":"2018-04-24T12:42:42","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=15615"},"modified":"2021-02-18T09:38:13","modified_gmt":"2021-02-18T07:38:13","slug":"ui-grid-component-on-the-front-end-in-magento-2","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html","title":{"rendered":"How to Use UI Grid Component on the Front End in Magento 2"},"content":{"rendered":"\n<p>There are plenty examples of such a wonderful UI component as grid on the administrator part of the site. Using grid on the front end allows us to quickly enable paging, sorting and filtering via standard Magento functionality without having to invent something new. However, you will encounter a lack of less, fonts and an ajax data request error for the grid.<\/p>\n<p><!--more--><\/p>\n<p>It is going to look like this:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter wp-image-15616 size-full\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/04\/1.png\" alt=\"1\" width=\"735\" height=\"463\" title=\"How to Use UI Grid Component on the Front End in Magento 2\"><\/p>\n<p>You can use our UiGrid module to solve this problem quickly. The module is available at <a href=\"https:\/\/github.com\/belvg-public\/ui-grid\" target=\"_blank\" rel=\"noopener\">github.com<\/a>.<\/p>\n<p>To use the module, specify the dependency in the file <strong>etc\/module.xml<\/strong>:<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;sequence&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;module name=\"Belvg_UiGrid\"\/&gt;\r\n&nbsp;&nbsp;&lt;\/sequence&gt;<\/pre>\n<p>Add CSS on the page with the grid:<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;head&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;css src=\"Belvg_UiGrid::css\/backend.css\"\/&gt;\r\n&lt;\/head&gt;<\/pre>\n<p>Ajax data requests from the admin side go at URL <strong>mui<\/strong><strong>\/index\/render<\/strong>.<\/p>\n<p>This does not suit us, that is why we need to change the URL to your controller in the <strong>app\/code\/Vendor\/Module\/view\/frontend\/ui_component\/{your_route}.xml<\/strong>&nbsp;file:<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;item name=\"update_url\" path=\"{your-route}\/controller\/index\" xsi:type=\"url\"\/&gt;<\/pre>\n<p>Inherit the controller from:<\/p>\n<pre class=\"lang:php decode:true\">\\Belvg\\UiGrid\\Controller\\Mui\\Index\r\n&lt;?php\r\nnamespace Vendor\\Module\\Controller\\Index;\r\nclass Index extends \\Belvg\\UiGrid\\Controller\\Mui\\Index\r\n{\r\n}<\/pre>\n<p>Now the grid should look as usual:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter wp-image-15617 size-full\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/04\/2-1.png\" alt=\"2 (1)\" width=\"640\" height=\"234\" title=\"How to Use UI Grid Component on the Front End in Magento 2\"><\/p>\n<p>In the example, the administrator can manage notes for customers. Customers can view notes and delete them. The examples are available at <a href=\"https:\/\/github.com\/belvg-public\/ui-grid\" target=\"_blank\" rel=\"noopener\">github.com<\/a>.<\/p>\n<p>Note that in order for a user to see not all the records, but only his own, you need to create your DataProvider and indicate it in <strong>ui_component\/{your_route}.xml<\/strong>.<\/p>\n<p>Ui_component:&nbsp;<strong>app\/code\/Vendor\/Module\/view\/frontend\/ui_component\/{your_route}.xml.<\/strong><\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;?xml version=\"1.0\" ?&gt;\r\n&hellip;\r\n&lt;argument name=\"class\" xsi:type=\"string\"&gt;Belvg\\Note\\Model\\DataProvider&lt;\/argument&gt;\r\n&hellip;<\/pre>\n<h2><strong><span style=\"color: #000000;\">Model<\/span><\/strong><\/h2>\n<p>We specify filter conditions in the data provider: <strong>app\/code\/Vendor\/Module\/Model\/DataProvider.php.<\/strong><\/p>\n<pre class=\"lang:php decode:true\">&lt;?php\r\nnamespace Belvg\\Note\\Model;\r\nuse Magento\\Framework\\Api\\FilterBuilder;\r\nuse Magento\\Framework\\Api\\Search\\SearchCriteriaBuilder;\r\nuse Magento\\Framework\\App\\RequestInterface;\r\nuse Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\Reporting;\r\nclass DataProvider extends \\Magento\\Framework\\View\\Element\\UiComponent\\DataProvider\\DataProvider\r\n{\r\n&nbsp;&nbsp;&nbsp;protected $customerSession;\r\n&nbsp;&nbsp;&nbsp;\/**\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param \\Magento\\Customer\\Model\\Session $customerSession\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param string $name\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param string $primaryFieldName\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param string $requestFieldName\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param Reporting $reporting\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param SearchCriteriaBuilder $searchCriteriaBuilder\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param RequestInterface $request\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param FilterBuilder $filterBuilder\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param array $meta\r\n&nbsp;&nbsp;&nbsp;&nbsp;* @param array $data\r\n&nbsp;&nbsp;&nbsp;&nbsp;*\/\r\n&nbsp;&nbsp;&nbsp;public function __construct(\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\\Magento\\Customer\\Model\\Session $customerSession,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$name,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$primaryFieldName,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$requestFieldName,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reporting $reporting,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SearchCriteriaBuilder $searchCriteriaBuilder,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RequestInterface $request,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FilterBuilder $filterBuilder,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array $meta = [],\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array $data = []\r\n&nbsp;&nbsp;&nbsp;) {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;customerSession = $customerSession;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::__construct(\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$name,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$primaryFieldName,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$requestFieldName,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$reporting,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$searchCriteriaBuilder,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$request,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$filterBuilder,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$meta,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$data\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);\r\n&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;protected function prepareUpdateUrl()\r\n&nbsp;&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;data['config']['filter_url_params']['customer_id'] = $this-&gt;customerSession-&gt;getCustomer()-&gt;getId();\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::prepareUpdateUrl();\r\n&nbsp;&nbsp;&nbsp;}\r\n}<\/pre>\n<p>Done. Now we have a full grid from the front end, in which&nbsp;a customer can see only his own notes:<\/p>\n<p class=\"alignnone\"><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/04\/3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter wp-image-15618 size-full\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/04\/3.png\" alt=\"3\" width=\"643\" height=\"215\" title=\"How to Use UI Grid Component on the Front End in Magento 2\"><\/a><br>\nThat is it concerning&nbsp;UI grid component in Magento 2, we hope you will easily implement the article&rsquo;s material into your Magento 2 development process.<\/p>\n\n","protected":false},"excerpt":{"rendered":"UI Grid Component in Front End Magento 2","protected":false},"author":82,"featured_media":15622,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[389,473,524],"tags":[],"class_list":["post-15615","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-magento2-development","category-magento-front-end-developer","category-magento-speed-optimization","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Find out how to enable full grid with less, fonts and an ajax data request in Magento 2 frontend with the help of UiGrid module.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Andrey Litvin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#article\",\"name\":\"How to Use UI Grid Component in Magento 2 | BelVG Blog\",\"headline\":\"How to Use UI Grid Component on the Front End in Magento 2\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/how-to-use-ui-grid-component.jpg\",\"width\":770,\"height\":433},\"datePublished\":\"2018-04-24T14:42:42+02:00\",\"dateModified\":\"2021-02-18T09:38:13+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":25,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#webpage\"},\"articleSection\":\"Magento 2 Development, Magento Front End Developer, Magento Speed Optimization, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"name\":\"Magento 2 Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"position\":2,\"name\":\"Magento 2 Development\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#listItem\",\"name\":\"How to Use UI Grid Component on the Front End in Magento 2\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#listItem\",\"position\":3,\"name\":\"How to Use UI Grid Component on the Front End in Magento 2\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"name\":\"Magento 2 Development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin\",\"name\":\"Andrey Litvin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Andrey Litvin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html\",\"name\":\"How to Use UI Grid Component in Magento 2 | BelVG Blog\",\"description\":\"Find out how to enable full grid with less, fonts and an ajax data request in Magento 2 frontend with the help of UiGrid module.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/how-to-use-ui-grid-component.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html\\\/#mainImage\",\"width\":770,\"height\":433},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/ui-grid-component-on-the-front-end-in-magento-2.html#mainImage\"},\"datePublished\":\"2018-04-24T14:42:42+02:00\",\"dateModified\":\"2021-02-18T09:38:13+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Use UI Grid Component in Magento 2 | BelVG Blog","description":"Find out how to enable full grid with less, fonts and an ajax data request in Magento 2 frontend with the help of UiGrid module.","canonical_url":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#article","name":"How to Use UI Grid Component in Magento 2 | BelVG Blog","headline":"How to Use UI Grid Component on the Front End in Magento 2","author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/04\/how-to-use-ui-grid-component.jpg","width":770,"height":433},"datePublished":"2018-04-24T14:42:42+02:00","dateModified":"2021-02-18T09:38:13+02:00","inLanguage":"en-US","commentCount":25,"mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#webpage"},"articleSection":"Magento 2 Development, Magento Front End Developer, Magento Speed Optimization, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","name":"Magento 2 Development"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","position":2,"name":"Magento 2 Development","item":"https:\/\/belvg.com\/blog\/category\/magento2-development","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#listItem","name":"How to Use UI Grid Component on the Front End in Magento 2"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#listItem","position":3,"name":"How to Use UI Grid Component on the Front End in Magento 2","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","name":"Magento 2 Development"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author","url":"https:\/\/belvg.com\/blog\/author\/andrey-litvin","name":"Andrey Litvin","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Andrey Litvin"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#webpage","url":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html","name":"How to Use UI Grid Component in Magento 2 | BelVG Blog","description":"Find out how to enable full grid with less, fonts and an ajax data request in Magento 2 frontend with the help of UiGrid module.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/04\/how-to-use-ui-grid-component.jpg","@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html\/#mainImage","width":770,"height":433},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html#mainImage"},"datePublished":"2018-04-24T14:42:42+02:00","dateModified":"2021-02-18T09:38:13+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"15615","title":"How to Use UI Grid Component in Magento 2 | #site_title","description":"Find out how to enable full grid with less, fonts and an ajax data request in Magento 2 frontend with the help of UiGrid module.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:37:10","updated":"2026-11-03 18:37:10"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento2-development\" title=\"Magento 2 Development\">Magento 2 Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Use UI Grid Component on the Front End in Magento 2\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento 2 Development","link":"https:\/\/belvg.com\/blog\/category\/magento2-development"},{"label":"How to Use UI Grid Component on the Front End in Magento 2","link":"https:\/\/belvg.com\/blog\/ui-grid-component-on-the-front-end-in-magento-2.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/15615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=15615"}],"version-history":[{"count":0,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/15615\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/15622"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=15615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=15615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=15615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}