Adding Guides to Dashboard Pages
Once you have a centralized help registry for your application, you can start to do some interesting things with it. Let's add a Launch Guide button to our acme_widgets Dashboard page. Change this:
$this->app['help/dashboard']->registerMessageString('/dashboard/acme\_widgets/add', t('Add a Widget.') );
$this->app['help/dashboard']->registerMessageString('/dashboard/acme\_widgets/add', array(t('Add a Widget.'), 'add-widget') );
This should be pretty self-explanatory. First, we set up the steps array. The options available in this array are all documented in the Tourist documentation. Next, we create a new tour object. Since we want the help launcher to close the moment we start the tour, we bind the ConcreteHelpLauncher.close() method to the start event of our tour (note: this is optional). Finally, we register this tour object to "add-widget" – which is the name of the guide as referenced in registerMessageString above.
And that's it! Clicking the button launches our guide: