-
Help content can be retrieved from your own help files and it will be displayed inside a modal box in your
application.
-
To use onpage help you should build a custom Javascript file using JS builder tool and include
onpage help feature or you can directly include
assets/js/ace/elements.onpage-help.js
file.
-
To initiate help you can call:
jQuery(function($) {
var help = new Onpage_Help({/* for available options, see below */});
$('#some-button').on('click', function() {
help.toggle();
//or help.enable()
//or help.disable()
})
})
-
Your application page should have special comments for special sections that have help material:
Some elements are here which will show a help dialog when clicked!
-
The help content is retrieved dynamically from a remote file that you specify.
That file should have similar comments like above:
Documentation and help content for "manage/user" are here inside some file.
There should also be an element with data-id="#manage/user"
attribute
which is used to specify modal box's title.
If no such element exists, its possible parent is looked up and if available its title is used for the modal box!
-
If inside one documentation(help) page, there are several sections to be displayed in your application,
you should use "."(dot) character to separate them:
Manage user documentation is here
..
..
..
Delete user documentation is here
-
Same is true for your application page:
Edit
..
..
..
Delete
-
When user clicks on a help section to see its content, the name of section is passed
to "section_url" function in which you should return the url which contains relevant help material.
Please see next section for more info.
-
If you have files with HTML, CSS, etc code that you want to show inside the modal help dialog,
you can wrap the path inside a
code
tag with .open-file
class
and data-open-file="css"
attribute:
path/to/some/file.js