In this guide we will create a new asset which extends "User" asset. The "Better User" asset will have more attributes like address, phone, state.
To create a simple asset, in this case a "Better User" asset, we will need to create few directories and files. From your Matrix root execute the commands presented below
Create a package directory under package/cms. (Squiz Developers: If you do not have these directories please see the "How to checkout Matrix on Delta" guide.)mkdir packages/cms/better_userChange in to the better_user directory.
cd packages/cms/better_userCreate an empty asset.xml file. This file will have info about our new asset. Which package it belongs to, its type, version, name, requirements etc.
touch asset.xmlCreate edit_interface_screen_details.xml. This is one of the screen files for Details screen. It defines how the Details screen will look in the backend and limbo (frontend editing). For more details on screens see the "Screens" documentation.
touch edit_interface_screen_details.xmlCreate better_user_edit_fns.inc. This file will have php functions that prints and processes some of the attributes.
touch better_user_edit_fns.incCreate better_user.inc, the main asset file where frontend printing and processing is handled.
touch better_user.incCreate better_user_management.inc, this file will have information about the attributes to be stored in the asset.
touch better_user_management.incCreate "locale" directory and "locale/en" directories.
mkdir locale mkdir locale/enCreate lang_screen_details.xml in locale/en/ directory. This file will have display name and notes for attributes.
touch locale/en/lang_screen_details.xml