duancai7002 2010-12-24 10:35
浏览 59
已采纳

如何在构建模块公共页面时添加其他视图(部分视图)?

Please take a look at this code // Create event output $this->template->title($event->meta_title)

        ->set_metadata('keywords', $event->meta_keywords)
        ->set_metadata('description', $event->meta_description)

        ->set('event', $event_array)

        ->append_metadata('
            <style type="text/css">
                ' . $event->layout->css . '
                ' . $event->css . '
            </style>
            <script type="text/javascript">
                ' . $event->js . '
            </script>')

        ->build('event', $this->data);
}

This is a partial code from a controller method which construct a page. If I want to load another view (partial view) such partial/form.php and bypass a data to it (). After that, I'd like to display the form after the event's article right before the comments (before the output of. How do I make it happened? Sorry for my silly questions. I'm quite new to PyroCMS, PHP, MVC on practice. :D. I only knew the theory. Now, I let myself to dive in to feel it and try it.

Thanks a bunch.

Merry XMAS

  • 写回答

1条回答 默认 最新

  • dongzhuo1958 2010-12-26 00:26
    关注

    Not a silly question at all. To understand the template library better, check out its specific documentation:

    http://philsturgeon.co.uk/demos/codeigniter-template/user_guide/

    PyroCMS uses lots of my libraries, some of which have documentation and some don't. I need to get around to getting it all done but its a massive thankless task and I have plenty on my plate already. :)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法