Hi,
I want to pass data fetch from database to phtml file located at following location.
./app/design/frontend/default/default/template/mymodule/mymodule.phtml
I tried placing code mymodule/Block/IndexController.php and other location using
Mage::register('name-of-registry-key', $your-data);
To get data.
$var = Mage::registry('name-of-registry-key');
Where in module folder I need to place this code to be able to access from phtml file.
Also Is it good practice to get database connection phtml file to perform work using $connection =
Mage::getModel('core/resource')->getConnection('core_read');
Any idea?
-Thanks & Best Regards, Zohaib