-1

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?

crash01
  • 117
  • 1
  • 8

2 Answers2

2

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.

gspatel
  • 1,128
  • 8
  • 12
1

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)

biakaveron
  • 5,493
  • 1
  • 16
  • 20