0

Given /Projects/index.ctp and /Person/view.ctp, I want to make a combined view person-projects.ctp (displaying all of the person-projects) by inheriting both of the views. Is this possible?

4

1 回答 1

1

在 Cake2.x 中,您不继承视图(这是面向 OOP 和类的东西),您扩展它们: http ://book.cakephp.org/2.0/en/views.html#extending-views

请注意,您仍然可以使用元素来共享/分组代码/标记。

于 2013-09-12T20:05:35.933 回答