Issue: Your Widget or Theme needs sample data for kickstart. There is no automatic, easy and standard way to package Sample Data with all of its assets(i.e. images, videos,etc) part of single artifact deliverable for easy install to client.
Solution: Use Features module along with some custom modules to handle assets and sample data exports/imports in an automotive manner without another dependency
In this session, we would begin by sharing the common practice to package widgets and themes at DesignsSquare.com to be delivered to client for easy installation. To accomplish this, the deliverable is separated into 3 parts - code, Data Structures&Configurations and Sample Data for KickStart all part of one deliverable via Features.
The Sample Data - node and menu instances all are exported/imported via newest version of Features and other custom modules. The custom modules import ‘path alias’ and menus based on path alias.
The custom modules automatically handle the assets – images, videos, etc for sample data. Specifically:
- assets referenced from sample content
- assets referenced by fields(both core type or custom type)
- assets referenced by variables
Note: for assets referenced by custom type and variables, the custom modules only handle assets by file_managed functionality
To summarize, the sample data and assets it references are packaged and delivered via Features modules part of single artifact deliverable. The custom modules covered in this session handles the sample data and its assets automatically so developer can focus on building widgets/themes while making it easy for client to install
share our experience and process on handling sample data and assets for kickstart of widget or theme