f6abd11d10fe71dd8602f337ab3fdf784ad27554
[catagits/CatalystX-HelpText.git] / lib / CatalystX / HelpText.pm
1 package CatalystX::HelpText;
2 use strict;
3 use warnings;
4
5 our $VERSION = '0.001';
6
7 1;
8
9 =head1 NAME
10
11 CatalystX::HelpText - Helper to include text/html snippets in Catalyst View templates
12
13 =head1 SYNOPSIS
14
15 Create a model class in your Catalyst project like:
16     package TestApp::Model::Help;
17     use Moose;
18     use namespace::autoclean;
19
20     extends 'CatalystX::HelpText::Model';
21
22     1;
23
24 Configure it setting value for:
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
45
46 Create files with the text/html to be included and store them at help_files_path.
47
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.
54
55 =head1 SEE ALSO
56
57 =over
58
59 =item L<CatalystX::HelpText::Model>
60
61 =item L<CatalystX::HelpText::ViewRole>
62
63 =back
64
65 =head1 AUTHOR
66
67 Toomas Doran, C<< t0m at state51.co.uk >>
68
69 Cinxgler Mariaca Minda, C<< cinxgler at ci-info.com >>
70
71 =head1 COPYRIGHT
72
73 Copyright Oscar Music and Media 2011.
74
75 =head1 LICENSE
76
77 This sofware is free software, and is licensed under the same terms as perl itself.
78
79 =cut
80