cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

Specify the directory layouts and partials

Open nikolasha opened this issue 13 years ago • 4 comments

For what purpose the directory layouts and partials bound relative to the views directory? It is very inconvenient to multimodule applications where all modules share a common layout. In this case the views directory for each module should have its own, and the directory layout should be shared. You could do specify absolute paths layouts and partials? Or even better relative to the base path, if defined. Thank you!

nikolasha avatar Jan 22 '13 16:01 nikolasha

Currently you can only specify a directory relative to the views directory:

$view->setPartialsDir('../common/partials/');
$view->setLayoutsDir('../common/layouts/');

ghost avatar Jan 25 '13 22:01 ghost

Is there a workaround so that the layout directory is outside of views directory?

ghost avatar Oct 16 '13 16:10 ghost

@thoreon can't you just pass the absolute path to setLayoutsDir()?

ghost avatar Oct 17 '13 15:10 ghost

hi sjinks, setLayoutsDir() will only set the directory under views directory. I want to have the layouts directory totally independent with the views.

ghost avatar Oct 20 '13 01:10 ghost