Parent view .hbs doesn't load by default when extending to module level

Hi folks,

I have created a custom sidecar view at the application level (custom/clients/base/view/{view-name}) with metadata, js controller and an hbs template.

I have extended the same view at module level for multiple modules and would like to render the existing parent .hbs template instead of copy paste the hbs file at module level.

I tried passing this.tplName, 'template' property in metadata file, this.type etc. but nothing is working.

My hbs is not loading for the extended views until I create a new .hbs file and copy paste the same code.

FYI, my extended view name is different than my parent view.

eg: parent view is - heading-panel

extended view : heading-panel-acc, heading-panel-case etc.

Please assist and let me know if I am missing anything.

Regards.

Parents
  • Hi all,

    It finally worked for me by passing 'template' property to the metadata file.

    Child view:

    <?php

    $viewdefs['<module>']['base']['view']['heading-panel-case'] = array(
        'template' => 'heading-panel', //this is my parent view name
    );

    Now, it is loading parent view .hbs for all the extended views.

    Regards.

    Hats

Reply
  • Hi all,

    It finally worked for me by passing 'template' property to the metadata file.

    Child view:

    <?php

    $viewdefs['<module>']['base']['view']['heading-panel-case'] = array(
        'template' => 'heading-panel', //this is my parent view name
    );

    Now, it is loading parent view .hbs for all the extended views.

    Regards.

    Hats

Children
No Data