【问题标题】:Can't view variable value as simple test in SocialEngine无法在 SocialEngine 中将变量值视为简单测试
【发布时间】:2017-06-16 12:54:55
【问题描述】:

我在 Controller.php 中的代码是:

<?php

class Widget_TestWidgetController extends Engine_Content_Widget_Abstract
{
  public function indexAction()
  {
    $this->view->msg('Test Widget');
  }
}

并且在 index.tpl 中是:

<?php
    echo $this->msg;
?>

我已经上传了我下载的小部件的所有骨架,并进入了布局->布局编辑器并将那个简单的小部件放入页面,但它没有显示我从控制器发送到视图的消息,但是用于 SocialEngine 本身的其他小部件可以正常工作。

我该如何解决这个问题?

【问题讨论】:

    标签: php model-view-controller widget socialengine


    【解决方案1】:

    我在控制器中的方法结构错误:

    $this->view->msg('Test Widget'); => $this->view->msg = 'Test Widget';
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-03
      • 1970-01-01
      • 2022-10-20
      • 1970-01-01
      • 2021-09-28
      • 1970-01-01
      • 2014-08-11
      • 1970-01-01
      相关资源
      最近更新 更多