Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a partial view from a different module in Zend?

I'm trying to access a partial view in foo from another module bar. Simplified file structure:

application/
    modules/
        foo/
            index.phtml
        bar/
            partial.phtml

And in index.html you would have the following code:

<?php echo $this->partialLoop('../bar/partial.phtml', $this->paginator);
echo $this->paginator; ?>

The problem is that you can't actually use parent traversal, as I get this error:

Requested scripts may not include parent directory traversal ("../", "..\" notation)

Is there any way to still include the partial view into my content page? (Or am I doing it wrong?) Thanks in advance.

like image 896
levivanzele Avatar asked Apr 08 '11 19:04

levivanzele


1 Answers

You need to pass the module argument:

<?php echo $this->partialLoop('partial.phtml', 'bar', $this->paginator); ?>
like image 199
prodigitalson Avatar answered Oct 20 '22 09:10

prodigitalson