Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Migrando o TemplatePower para Smarty - Substituir newBlock()

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Portuguese
View previous topic :: View next topic  
Author Message
ricardo
Smarty n00b


Joined: 15 Mar 2011
Posts: 2

PostPosted: Tue Mar 15, 2011 5:51 pm    Post subject: Migrando o TemplatePower para Smarty - Substituir newBlock() Reply with quote

Pessoal, boa tarde.
Estou peleando aqui na migracao e me surgiu uma duvida que certamente
para vocês é coisa facil, mas pra mim tah complicado.

Minha duvida é o seguinte:

TEMPLATEPOWER
==============================
.php
----------
foreach ($xml->channel->item as $item)
{
$titulo = $item->title;
$link = $item->link;
$noticia =$titulo;
$cont++;
$this->tpl->newBlock('destaques');
$this->tpl->assign('destaque', $noticia);
$this->tpl->assign('link', $link);
}

.tpl
----------
<!-- START BLOCK : destaques -->
<p><a href="{link}">{destaque}</a></p>
<!-- END BLOCK : destaques -->
==============================

No Smarty, eu ateh consegui fazer ele jogar o conteudo
no lugar certo, mas no TP, ele mostra varias noticias (uma
embaixo da outra) e no Smarty estah mostrando apenas uma
(a ultima). Queria ver com vocês, qual é o comando q eu devo
usar no smarty para q surja o mesmo resultado do TP.

Vocês tem como m dar uma luz no fim do tunel?

Desde já agradeco, abraco.......
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Portuguese All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP