ColdFusion Builder allows you to create a mobile application based on pre-defined templates. These templates are basically CFML files that can use third-party web frameworks like Bootstrap or jQuery Mobile. ColdFusion Mobile Templates enhance productivity, allowing few of your developers to focus on  the design of your applications, while the other developers can focus on the functionality of the applications.

ColdFusion Builder supports 2 kinds of mobile templates:

  1. System templates - The bundled mobile templates.
  2. User templates -  The templates created by you.

Structure of mobile templates

Your mobiles templates can be in a custom directory or an archive (.zip) file. User defined templates should be stored in <cfbuilder install>/templates/mobile/user. If you want to create your own mobile template, you need to have the following mandatory items in your template directory:

  • config.xml - The configuration file for your template.
  • <your_template_dir> - The directory containing the template files.

Note the following requirements:

  1. You can provide a template name in the config.xml file as follows:

    <template name="My Template">

    If you do not provide a template name, the folder name or the archive (.zip) file name will be used.

  2. Description can be provided in the configuration file:

    The template description
    </description>

  3. You MUST specify one or more types in your template. Types are logical grouping of your templates. For instance, all jQuery Mobile based templates can be named as 'jQueryTemplates'. In this case, you need to have a corresponding directory, 'jQueryTemplates' at teh same level as config.xml file.

An example configuration file

The following example shows a valid configuration file, config.xml:

<template name="My Template">
<description>
The template description
</description>
<types>
<type value="jQuery" >
<description>
My mobile template containing jQuery Mobile files.
</description>
</type>
<type value="javascript" />
<type value="bootstrap">
<description>
My mobile template containing Bootstrap files.
</description>
</type>
</types>
</template>

For using the mobile templates, see Building Mobile Applications.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy