I'm wondering if you're not confusing the entities with the controllers. Make sure you're following the module directory structure conventions that is summarized (including only what is relevant to your question) as follows:
/module
|--/MasterData
|----/src
|--------/Controller
|-----------/Entity1Controller
|-----------/Entity2Controller
|--------/Model
|-----------/Entity1
|-----------/Entity2
|----/view
|------/master-data
|--------/entity1
|-----------/action1.phtml
|-----------/action2.phtml
|--------/entity2
|-----------/action1.phtml
|-----------/action2.phtml
...
For the template path stack, and under the previous structure, the configuration is simply:
'view_manager' => array(
'template_path_stack' => array(
__DIR__ . '/../view',
),
),
Remember, under the view folder the default convention:
- entity1 is mapped to your Entity1Controller (in case your controller is camelCased, eg:
MyFooController
, the corresponding folder name would bemy-foo
) - action1.phtml is mapped to the
action1Action
method of yourEntity1Controller
class (same remark as above if your action name is camelcased).