I'm from Brazil, so sorry for bad English, I'd like to display data from the database table on my frontend screen, I'm trying this way:
Teste/Cadastro/Block/Tabela.phpTeste/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.phtmldefault/template/cadastro/cadastro.phtml
...
<div>
<?php echo $this->getContent(); ?>
</div>
...
And in my config.xmlconfig.xml I have the declared block.
Does this have to be done through a block or even an action?