How do you switch from metadata to smarty templates?

If you create a module with module builder, it creates layout defs. If you then create a views folder, and add the views per the developer guide, such as view.edit.php, view.detail.php

It ignores these files.
If I delete the metadata files it recreates them!

Is there just a simple guide for a simple smarty template hello world example?
It is NOT clear from ANY of the docs how to make the switch. Seriously large gap in the documentation.

To switch metadata to smarty templates of View, need to create view and smarty template file as suggested below :

We have created a New/Custom module using Module Builder.

Create View File(We have created view.edit.php) :

File Path: modules/CM_CustomModule/views/view.edit.php

Create Smarty Template File :

File Path: modules/CM_CustomModule/tpls/CMCustomModuleEditview.tpl

One you open Editview of the module, you can see the Message as shown in the below screenshot.

3 Likes

Thank you @jessica1 that is a superb example which really helped me! :slight_smile:

You are welcome @suityou01

Let me know in case you face any issues other than this.