开发者

Magento, how i can send variable from MyController to my view phtml?

开发者 https://www.devze.com 2023-04-08 01:38 出处:网络
how i can send variable from MyController to my view phtml? Zend framework, i send like this: // MyController

how i can send variable from MyController to my view phtml?

Zend framework, i send like this:

// MyController

$this->view->name = "Matheus";

or

$this->view->assign('name',"matheus");

// M开发者_运维问答y View

echo $this->name;

in Magento Controller, how i send from MyController to my view, and how i can see in my view the variable?

thanks!


Magento MVC is different to Zend one, it is configuration based. View in magento consists of 2 parts - block (class) and template plus layout update in xml file. It can't be described in 2 words, you should read this article.

0

精彩评论

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