Commit | Line | Data |
e226a3e6 |
1 | package CatalystX::HelpText; |
e94c600f |
2 | use strict; |
3 | use warnings; |
4 | |
5 | our $VERSION = '0.001'; |
e226a3e6 |
6 | |
7 | 1; |
8 | |
9 | =head1 NAME |
10 | |
e94c600f |
11 | CatalystX::HelpText - Helper to include text/html snippets in Catalyst View templates |
e226a3e6 |
12 | |
47227b17 |
13 | =head1 SYNOPSIS |
e226a3e6 |
14 | |
47227b17 |
15 | Create a model class in your Catalyst project like: |
16 | package TestApp::Model::Help; |
17 | use Moose; |
18 | use namespace::autoclean; |
e226a3e6 |
19 | |
47227b17 |
20 | extends 'CatalystX::HelpText::Model'; |
21 | |
22 | 1; |
23 | |
24 | Configure it setting value for: |
e94c600f |
25 | |
26 | =over |
27 | |
28 | =item help_files_path |
29 | |
30 | Where the help files will be found |
31 | |
32 | =item help_files_ext |
33 | |
34 | What is the extension for the help files (default: html) |
35 | |
36 | =item wrapper_tag |
37 | |
38 | What tag will be used to wrap the shippet (default: span) |
39 | |
40 | =item wrapper_css_class |
41 | |
42 | What css class will be applied to the wrapper tag (default: help_text) |
43 | |
44 | =back |
47227b17 |
45 | |
46 | Create files with the text/html to be included and store them at help_files_path. |
47 | |
e94c600f |
48 | Apply the L<CatalystX::HelpText::ViewRole> in your View. |
49 | |
50 | Uses the C<< [% helptext('SomeHelpTopic') %] >>in your templates to include the |
51 | file C<SomeHelpTopic.html> in the page. |
52 | |
53 | Uses the script C<search_undocumented_templates.pl> to find the missing help text files. |
47227b17 |
54 | |
e94c600f |
55 | =head1 SEE ALSO |
47227b17 |
56 | |
e94c600f |
57 | =over |
58 | |
59 | =item L<CatalystX::HelpText::Model> |
60 | |
61 | =item L<CatalystX::HelpText::ViewRole> |
62 | |
63 | =back |
e226a3e6 |
64 | |
65 | =head1 AUTHOR |
66 | |
e94c600f |
67 | Toomas Doran, C<< t0m at state51.co.uk >> |
68 | |
69 | Cinxgler Mariaca Minda, C<< cinxgler at ci-info.com >> |
e226a3e6 |
70 | |
3259663d |
71 | =head1 COPYRIGHT |
72 | |
e94c600f |
73 | Copyright Oscar Music and Media 2011. |
3259663d |
74 | |
75 | =head1 LICENSE |
e226a3e6 |
76 | |
77 | This sofware is free software, and is licensed under the same terms as perl itself. |
78 | |
79 | =cut |
80 | |