How to get the custom email templates list in magento2
-
08-03-2021 - |
Frage
How to get custom email templates list collection in magento2. how to get the collection
Lösung
It is working for me.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$alltemplele = $objectManager->get('\Magento\Email\Model\ResourceModel\Template\Collection');
$alltemplele = $alltemplele->toOptionArray();
print_r($alltemplele_data);
Andere Tipps
try with below code for get email templates :
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$alltemplele = $objectManager->get('\Magento\Email\Model\ResourceModel\Template\Collection');
$alltemplele_data = $alltemplele->toOptionArray();;
print_r($alltemplele_data);
i hope its work for you.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange