Creation of elemental modules

Hi All,
Can anybody here help me with creating a module in elemental page builder. The client that I am working with wants to use only elemental page builder not the default SS template creation and editing. I would much appreciate it if there was a documentation on how to do it also.
I searched the entire web and was not able to find out anything. I YouTube in StripeCon 2021, they attempted to show module creation but due to video editing, skipped over couple of steps so that tutorial is of no use anymore.
Although there are custom 3rd party modules available for elemental now, I need to create my own module.
Hoping someone can help me with this.
Yours Sincerely,
Thomas

Can you provide a little more information about which steps you’re missing? / What you’ve done so far?
Creating a basic elemental module is just a case of extending the base element, eg:

<?php

namespace Demo\Element;

use DNADesign\Elemental\Models\BaseElement;

class MyElement extends BaseElement
{
  private static $table_name = 'MyElement';

  private static $db = [
    'SomeContentField'  =>  'HTMLText'
  ];

  public function getType()
  {
    return 'Example';
  }
}

Then you’d have a template (in this case, at Templates/Demo/Element/MyElement.ss):

<div>$SomeContentField</div>

Run a dev/build and you should be able to see your element in the CMS and use it on the site.

@Tim,
Thank you for your help. One doubt I have is where to place the above php snippet? I watched this video below(27:07). Its been a month since I looked into silverstripe so my knowledge is limited.
Esssentially, I was able to make the module appear in all modules list but on adding it , it throws an error basically saying that the fronend of the module in website cannot be shown.

It depends a little on your project structure. In the case of the above, on a new install, the PHP file would be in app/src/Element/MyElement.php

Can you paste the exact error message you’re seeing? I’m guessing that the tempate file can’t be found. If you can also tell us where your files are (both the PHP file and the .ss template) and whether your element is in a namespace, then hopefully it’ll be a simple fix.

GitHub - silverstripe/silverstripe-module: A skeleton for the SilverStripe CMS supported module standard including useful default documentation might be useful to you - it provides a full skeleton for a Silverstripe CMS module - just add your code and you should be good to go. There’s also information in the docs about creating modules.

But ultimately, from a Silverstripe CMS purist point of view, any directory in your project directory which has either a _config.php file or a _config directory is considered a Silverstripe CMS module. If you get your code working in such a directory in your project locally, converting it into a sharable module that others can install should be pretty straight forward.