Create a Theme

You can create a Theme in an easy way, and create all the templates of that Theme.

But we recommend that you copy an already existent Theme with its templates, and then modify them so that you do not start from scratch with no templates.

Create a Theme from an existing one

Step 1 - Copy folder of existing Theme and rename it

Copy the folder of the existing Theme and paste it in the same folder directory. This is in '<GENEXUS_INSTALLATION>\Packages\SmartDevicesPlus\Themes':

CreateAThemeImg01

Rename it with the name of the new Theme to be created:

CreateAThemeImg02

Inside that folder there are some images, an SDP file and an XML named definition:

CreateAThemeImg03

  • The images are just illustrative to show to GeneXus developer the content of the Theme, when he is visualizing the Themes available in order to select one. But this images does not mean that there will be one template for each one inside the Theme. You can change this images so that they show developer the templates related to this new SmartDevicesPlus Theme. 
  • The SDP file contains all the templates available for that SmartDevicesPlus Theme, some GeneXus images and the changes that have to be impacted to GeneXus theme. The SDP file can be imported and exported from GeneXus (it's similar to an XPZ file but with a different extension).  
  • The definition.xml file specifies the layouts that will be available in this SmartDevicesPlus Theme for the SmartDevicesPlus templates when creating SDPanels based on SmartDevicesPlus templates. 

In the example below the layouts available are Android Portrait and iOs Portrait. So, the SDPanels based on SmartDevicesPlus templates of this SmartDevicesPlus theme won't have a layout for Landscape orientation.

CreateAThemeImg04 

Step 2 - Customize the templates, GeneXus Theme, images, etc.

After making the previous step, in GeneXus when you go to the option of selecting a SmartDevicesPlus Theme, the new Theme will appear:

CreateAThemeImg05

If you select it you will be able to modify the templates, GeneXus Theme, images associated to the templates, etc.

The specific SmartDevicesPlus templates, Themes, images that you can modify for this new SmartDevicesPlus Theme depends on the SmartDevicesPlus Theme that you made a 'Save as' in step 1. Each SmartDevicesPlus Theme could have different objects.

In the exampe above, we made a Save as of Flat Acid Orange SmartDevicesPlus Theme. The SmartDevicesPlus Templates that you can modify are the ones included in SDPTemplates folder:

CreateAThemeImg06

The images imported by this SmartDevicesPlus Theme are the ones which starts with: sdp. You could remove them or add other ones:

CreateAThemeImg07

The images that starts with SDPPreview are used for showing some SmartDevicesPlus template Preview. If you change some SmartDevicesPlus template it is recommended that you create a new image and substitute the image with the new one:

CreateAThemeImg08

In order to create a new image of the SmartDevicesPlus template you can make screen of some SD Panel which is created based on this SmartDevicesPlus template. 

The Themes that were modified are Android and iOs Theme:

CreateAThemeImg09

More info about modifying existent templates -> Customizing templates

Step 3 - Export Objects and place it in the Theme folder

Once you have finished customizing all the objects you have to export the necessary objects setting the extension as SDP (make Knowledge Manager -> Export and set the file name as <NAME_THEME>.SDP.

CreateAThemeImg10

The items that you would have to export depends on the objects, SmartDevicesPlus templates, images,themes that you have created or modified for this new SmartDevicesPlus theme.

In the example, if you maintain the same objects of the SmartDevicesPlus theme by default (the ones that the Flat Acid Orange had), but you make modifications on them, you would have to export the following items:

  • The folders: SDPTemplates, Charts, Detail, Edit, List, Login, Other
    CreateAThemeImg11
     
  • All the objects of type: SmartDevicesPlus template:
    CreateAThemeImg10
     
  • All the images which starts with SDP:
    CreateAThemeImg07
     
  • The GeneXus Themes for Android and iOs
    CreateAThemeImg13
     

Place the SDP file in the folder where the Theme is located <GENEXUS_INSTALLATION>\Packages\SDPlus\<THEME_NAME>

CreateAThemeImg14

Create a new Theme from scratch

It is very similar to create one copying it from an existent one. The difference is that you will create an empty folder with the name of the SmartDevicesPlus Theme, and then you will have to create all the SmartDevicesPlus templates from scratch, import the necessary images and make the changes in the GeneXus Theme in order to get what you need (Step 3 is exactly the same).

More info about creating new templates -> Customizing templates