Commit | Line | Data |
e226a3e6 |
1 | package CatalystX::HelpText; |
2 | use Moose; |
3 | use namespace::autoclean; |
4 | |
5 | 1; |
6 | |
7 | =head1 NAME |
8 | |
47227b17 |
9 | CatalystX::HelpText - Helper to include text/html snippets in Catalyst TT View templates |
e226a3e6 |
10 | |
47227b17 |
11 | =head1 SYNOPSIS |
e226a3e6 |
12 | |
47227b17 |
13 | Create a model class in your Catalyst project like: |
14 | package TestApp::Model::Help; |
15 | use Moose; |
16 | use namespace::autoclean; |
e226a3e6 |
17 | |
47227b17 |
18 | extends 'CatalystX::HelpText::Model'; |
19 | |
20 | 1; |
21 | |
22 | Configure it setting value for: |
23 | - help_files_path: where the help files will be found |
69ca94ae |
24 | - help_files_ext: what is the extension for the help files (default: html) |
25 | - wrapper_tag: what tag will be used to wrap the shippet (default: span) |
26 | - wrapper_css_class: what css class will be applied to the wrapper tag (default: help_text) |
47227b17 |
27 | |
28 | Create files with the text/html to be included and store them at help_files_path. |
29 | |
30 | Apply the CatalystX::HelpText::ViewRole in your TT View. |
31 | |
32 | Uses the [% helptext('SomeHelpTopic') %] in your templates to include the file SomeHelpTopic.html in the page. |
33 | |
34 | Uses the script bin/search_undocumented_templates.pl to find the missing help text files. |
e226a3e6 |
35 | |
36 | =head1 AUTHOR |
37 | |
47227b17 |
38 | Thomas Doran,C<t0m at state51.co.uk> |
3259663d |
39 | Cinxgler Mariaca Minda,C<cinxgler at ci-info.com> |
e226a3e6 |
40 | |
3259663d |
41 | =head1 COPYRIGHT |
42 | |
43 | Copyright state51. |
44 | |
45 | =head1 LICENSE |
e226a3e6 |
46 | |
47 | This sofware is free software, and is licensed under the same terms as perl itself. |
48 | |
49 | =cut |
50 | |