开发者

Reading xml in Smarty template

In my smarty template, I have this assigning...

{assign var="feeds" value="-RSS FEED LINK-"}

How do I parse the variable $feeds and print the values in each tag - in the smar开发者_开发知识库ty template?


This should load the XML into an Object and print it:

{assign var="feeds" value="-RSS FEED LINK-"}
{$feeds|@simplexml_load_string|@print_r}

But loke Paul said in the comments, I would suggest to do the assignment in PHP and then use smarty to just walk the object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜