October 28, 2016

Custom Dxa Modules Creation - Presentation

SDL Web 8 Developer Summit  2016 was second event in India and was really enjoyed by 50+ Audience including few Mvps including Nuno and Bart. Two days event was a great success.

All the goodies were great especially Pen drive.

I presented step by step way to create Dxa modules. which was really appreciated by all especially Nuno. I am sharing here my slides below for benefits of others. We will come with next season of summit next year as well.

October 18, 2016

Content Type Basics - Web 8 XPM

Content Type - It is predefined Component presentation that can be added to a Page using Experience Manager if that Component type is allowed on particular Page Template.

How to create  - Go to publication Property on the tab "Content type", at bottom click on Insert. you will see following form on the screen.

Already defined component presentation on a page automatically become content type for that page.

All the fields are very descriptive itself.  Define you content type at some common publication 
e.g Website Site Master. so that it gets available to all the site publication in XPM.

There are two types of settings in Content Type:
  • Blueprint Context Setting
  • Content type mapping Setting
Blueprint context Settings: Here we define if  a component for is created for a page in any publication what should be physical location of that component. as pages and components are created in different publications.
Just choose the publication here.
Content Type Mapping: In this mapping we basically specify mapping between Page template and Content type. e.g Carousel content type should only be available on Article and home page template

So you can do this setting on parent publication and post that. its get available to all child publication. 

Because "Inherit setting from Parent" is selected by default on all publications. so this setting get automatically available to all child publications. if you wan to override these settings, you can un-check the check-box and define new setting for that required publication.

Here you see all content type available in choose publication. here you can define what all Content type are available to which page template

Content type usage in XPM

After defining the content type, time to use it on desired pages. So load the XPM with the target page where you need to insert the content. when page loads. make sure lock sign in not there on top of the page. else you will not see options under Insert Content, as shown below

when you load a page in Xpm, and select Create and insert New Content option, on left side slider all content type enabled(which we did in last steps) on that PT is shown here. You choose it and it show you form to give a name to the component and choose the folder of that component, if you want to go ahead with earlier selected location that is also OK.

Publication for the component is chosen as per the blueprint context you set in settings.

Some issue exists in Content type
  1. Only first level of components are cloned in content types any linked component is not cloned but same component is used.
  2. When we create Content-type and choose folder location, it does not pick the blueprint context but show the folder from that publication only.
    but when you create component in XPM publication and folders are selected as per blueprint context. if folder choose at creation of content type not exists in the publication as per blueprint context, XPM throws Error.

October 14, 2016

SDL Web 8 & DXA Installation - CM

SDL WEB 8 Installation with DXA
To install typical DXA and Web 8 copy , following are the essential steps.

1)  CM Installation
a.      Database setup (run database Power-Shell scripts)
b.      CMS installation (run the execute table file)
c.       Configure Topology Manager (First we need to install the CD services)

2)    CD Installation
a.      Install all the content delivery services (windows service).
b.      Registered these capabilities into Discovery Service using Discovery Service registration command.

3)    DXA Installation on CM server
a.         Import DXA into the Content Manager
b.         Publish the Example Site (or at least a minimal set of Content Manager items) to get the Web site content into the Content Data Store from where it can be retrieved by the Web application on page request

4)    DXA Installation on CD server
a.      Install/Host DXA web application by running the PS script and once done run the site to see the page renderings.
Check Pre-requisites here for CMS

Setup Machine
  • Get ready with a Microsoft Windows Server 2012 R2 (x64) and logged into it with your Content Manager Administrator User.
  • Ensure that you have installed MS SQL Server 2014 or MS SQL Server 2012 R2 SP2
  • Create an MTS User – Preferably with Admin rights else we can choose it to be under normal User group under your domain system. 
    DB Installation
  • Open Windows Powershell by right clicking as choosing “Run As Administrator”
  • Navigate to  SDL Web8 Installation media path in Powershell – .\SDL_Web_8\Database\mssql
DBs to be Created
  • Content Manager Database
  • Topology Manager Database 
  • Content Data store/broker Database
  • Discovery Service Database 
  • Preview Session (XPM) Database
Note: Last three databases share same schema ie. Content Data Store.
a)        Content Manager Installation
    • Navigate to the SDL Web Installation Media and run SDLWeb8 executable by right clicking and choosing “Run as administrator”
    • Wizard will prompt for selecting the required components.
    • Next the setup will shows you all the missing prerequisite which SDL Web must have to work properly – o accept to install these missing prerequisite:
    • Once the prerequisites are all installed, you need to provide details of your MTS User:
    • Enter the details of Content Manager DB as created in earlier step
    • Enter the details of Topology Manager DB as created in earlier step
    •  Next enter the Environment ID – It is typically to identify your CM instance in case of a scaled out and/or load balanced environment. For a standalone environment, you can leave it default:
    • for next step of wizard enter requested information and done with the installation. 

    December 31, 2015

    My First DXA Module - JWPlayer - Steps by Step - Content Delivery

    In last post, i detailed my experience on the CMS Part of the DXA module. In this post i will explain the CDA part

    Visual Studio Solution: In Asp.net MVC each Module is separated by respective Area in the project. There are different ways to set your solution.

    • Use exiting DXA project and create required Area using Mvc ' Add Area..
    • You can use Visual studio extension for DXA to add, required files e.g Registration and Modle classes.
    • I find it easy to add above in existing DXA website, as it make me easy to debug and go ;)
    Structure of  this plugin
    so when we add new Area all the above folders, except Entity are automatically created along with web.config and JWPlayerAreaRegistration.cs file. 

    Step by Step changes:
    1. Create Model class which will be used in the ViewModel and carry the data from component of JWPlayer Schema.
    so here i have mapped all fields of schema to this ViewModel.

    2.  Create view which will use above model and render the JWplayer Video. the name of view should match with one given in CT's metadata.

    3. Update JWPlayerAreaRegisteration.cs so that it inherits  from  Sdl.Web.Mvc.Configuration.BaseAreaRegistration class
    and overrides the RegisterAllViewModels method to register above view and view-model in view-registry. see below image , This is again very important step

     Now time to compile and test the module.

    You will see following output.

    You can see JWPlayer logo on top the the video. this is there as i have not used any valid key for it.

    So we are done with the working DXA module step by step. 

    Now time to bundle this module using Powershell scripts and submit to the Gallery where people can use and improve it. 

    I will also send pull request on GIT to open source the code.  

    I have listed out the features  for next version, which i will definitely work in 2016. Stay tuned for that.

    Happy new year!!