Help files

From EPESI framework documentation
Jump to: navigation, search


You can create step by step tutorials for the user.

Files

Your tutorials should be placed in the special file in the directory of your's module.

<module dir>/help/tutorials.hlp

Your module has to implement help() method in Common file like this:

   public static function help() {
      return Base_HelpCommon::retrieve_help_from_file(self::Instance()->get_type());
   }

Example

This is an example file from Contacts module:

[LABEL:Create new contact]
[KEYWORDS:add person]
[CONTEXT:true]
[STEPS:
hover:Menu
hover:Menu_CRM
click:Menu_CRM_Contacts
click:browse_contact->ActionBar_add
fill:rb_add_contact->#last_name // Enter last name
fill:rb_add_contact->#first_name // Enter first name
prompt:rb_add_contact->#company_name // Feel free to fill in any other information you may have
click:rb_add_contact->ActionBar_save
finish:rb_view_contact->ActionBar_edit // A new contact has been created
]

[LABEL:Search for a contact]
[KEYWORDS:find person]
[CONTEXT:true]
[STEPS:
hover:Menu
hover:Menu_CRM
click:Menu_CRM_Contacts
click?:browse_contact->#switch_search_simple
fill:browse_contact->#gb_search_field // Enter keyword here
click:browse_contact->#gb_search_button
finish:browse_contact->#gb_search_button // Results are shown in the table
]

File structure

  1. Every definition is wrapped in brackets.
  2. Keyword separated from value by colon.
  3. Every LABEL definition starts a new help entry.
  4. Order of latter keywords doesn't matter, but we suggest to keep them as in the example.

Keywords

LABEL
label in the help box. Every LABEL definition starts a new help entry.
KEYWORDS
used to find a help entry with the search box
CONTEXT
if set to "true", "True", "TRUE", etc, then your help entry will show by default on the box. If this keyword is omitted or supplied value is other than variants of "true", then your help entry will be available only using search.
STEPS
steps of tutorial. New lines separate steps. Possible actions are: click, fill, finish, hover, prompt. After colon goes element identifier and you can put a help text after double slash //

Actions

click
Point an arrow to click an element
fill
Point an input box to be filled
finish
Finish tutorial
hover
Point out element to hover. Useful with menu entries
prompt
Ask to fill but allow to skip

Element identifiers

Menu, Menu_CRM, ActionBar_save
elements identified by special html attribute "helpid". Currently only Menu and ActionBar have ones. You can find them searching for helpid in EPESI source.
rb_add_contact, rb_view_contact, browse_contact
screen names, created by RecordBrowser module with method Base_HelpCommon::screen_name. Scheme is rb_<mode>_<recordset_name>. Every recordset will have it's screen name that you can refer. Browse is similar to previous, but it's a browse mode of RB browse_<recordset_name>.
You can create your own screen names in the module.
Other examples: browse_company, rb_add_premium_salesopportunity
#gb_search_button, #last_name
field ids defined by html attribute. If there are more than one element with specific ID, then first will be chosen.

Identifier may consist of a screen name, and other identifier, separated by '->', which means that specific identifier has to be within defined screen.