I'd like to display data from the database table on my frontend screen, I'm trying this way:
Teste/Cadastro/Block/Tabela.php
<?php
class Teste_Cadastro_Block extends Mage_Core_Block_Template
{
public function getContent()
{
$cadastroModel = Mage::getModel('cadastro/cadastro');
$collections = $cadastroModel->getCollection();
foreach($collections as $collection)
{
print_r($collection->getdata(''));
}
?>
default/template/cadastro/cadastro.phtml
...
<div>
<?php echo $this->getContent(); ?>
</div>
...
And in my config.xml I have the declared block.
Does this have to be done through a block or even an action?