I need to load a module's view as a partial view inside another view of the application. I find no clue about how to do this in the manual.
The view is completely independent of the module:
<?php
// This is the module's class. Do I need it here?
use vendor\xxx\cropk\CropK;
/* @var $this yii\web\View */
$this->title = 'Cropping Test';
?>
<div class="site-index">
<p>Cropping Test</p>
<?php
// ...
?>
</div>
How can I accomplish this?
Looking at render's documentation you have a few options:
Based on those choices, it looks like you will specify the absolute path within application, or create a path alias and use that syntax (app? main site view? wherever it's at.)
So, if you wanted to render the
{basePath}/views/site/my_partial.php
you'd do something like$this->renderPartial('//site/my_partial.php');
in your view.