I want to load custom module collection in module template file :
I have my custom module which havehas table name : tagdatatagdata
I want to load "tagdata" table data in my template file.
And yeah iI created a grid with UI component.
Please check my model file :
<?php namespace [vendor]\[module]\Model; class Extratags extends \Magento\Framework\Model\AbstractModel { function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = []) ) { parent::__construct($context, $registry, $resource, $resourceCollection, $data); } protected function _construct() { $this->_init('[vendor]\[module]\Model\ResourceModel\Extratags'); } }