How to show comments under the article in Kohana v3.2 ? Should I use subrequest to Comments Controller or just call the Comment model in "View" action of Article controller?

有帮助吗?

解决方案

Id preffer to HMVC calls. With HMVC you can use the same code for internal subrequests (show comment list under the article) and external calls (load/reload comments via AJAX)

其他提示

There are multiple pieces at play here. How do you get comment data to your views to use in multiple pages...well maybe create a model that does the comment retrieving.

How do you format the comments the same across multiple pages? You can either use a custom helper to format it into some standard html or you can do the view within a view logic to load the comment fragment in into the page.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top