December 31, 2015

My First DXA Module - JWPlayer - Steps by Step - CMS

DXA Modules allows us to extend its Functionality via providing new modules. Making separate modules for functionality gives flexibility & re-usability. Independent release of the modules can happen without concerning about the main DXA version and developer can develop their modules and publish at DXA Module repository.
I was very impressed by the DXA modular approach and framework when Bart shown us the slides in last MVP meet. This modular functionality is near similar to WordPress plugin world, where you can download thousands of plugins. Right now downloading in Dxa is not that smooth because nature of the complexity of Tridion vs WordPress and its just start, but i hope SDL will make it smoother in next releases and Alchemy.
btw wordpress also has JWPlayer plugin :)

Each DXA module has primarily two sections.

  1. CMS
  2. CD
CMS Part
  •  Define module's folder structure
  •  DXA has a predefined structure for putting all the building blocks of the module.  
  •  For each new DXA module, we need to create a new folder in Modules Folder
  • The name of folder is usually module name.
  • In Admin folder of module(JWPlayer) , a component of Module Configuration schema is created  
  • Site Manager usually contains Schema and Template to be controlled by Site manager.
  • Settings also have similar folder as in Module but it just contains component etc for defining any settings.

Module Configuration: This is the Mandatory details of the Module

 
  • Module Name: Defines a unique name of this module
  • Version to track any updates in future
  • URL for additional details
  • Active: never used it, but to enable disable the module
  • if  you module is dependent on any other module, so far i have seen only Core here
  • Any settings component is attached here in "Further Configuration section"
  • After setting there is resource section. if you have any resource do attach the resource component there.


i have attached JWPlayer Configuration Component of JWPlayer Configuration Schema, which contains one field for JWPlayer Key.

Schema
I have created another schema "JWPlayer"


This schema will be used by Editor to define the JWPlayer Video components with required Video details and attached to desired page.
Component Template:
I have created a new CT (JWPlayer) to be attached with component of above schema  and following are the metadata settings of it


Entity View Name : Value for Area and View name which will render this CT.

Region Name: Section name of webpage where this CT needs to be rendered. i wanted to render it on home page so used this. but can can be any new region as well.






So we are done with CMS part of the Module. now time to publish.

No comments: