0

I have a problem with rendering view from other module.

For example: I'm on page news.phtml and I need to add 'Add comment' page. The view of adding comments is in other module 'Comments' in file add.phtml.

I have no idea how to include this file on news page. I've tried something like this:

echo $this->render('module/Comments/view/comments/index/add.phtml'); 
echo $this->render('../../Comments/view/comments/index/add.phtml');

but nothing works. How could I do that?

user3740742
  • 51
  • 1
  • 1
  • 4

1 Answers1

1

you need to use partial view helper

echo $this->partial('comments/index/add'); 
Exlord
  • 5,009
  • 4
  • 31
  • 51
  • I've tried that too, I had problem with something different (second parameter was required) and now It's ok, anyway thanks – user3740742 Jul 15 '14 at 06:01