X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=doc%2FView.pod;h=c4691002a3ff36dafb1133454139c55eedb63ab2;hb=4ab33d12a514e0531e16f3d2812b15258de258c5;hp=d2fda7577c84726bc0617f9ea3b84a5de0204935;hpb=c1f02d5a40b94afa2bc1aa54e44b10cde37fccbd;p=maypole.git diff --git a/doc/View.pod b/doc/View.pod index d2fda75..c469100 100644 --- a/doc/View.pod +++ b/doc/View.pod @@ -420,8 +420,91 @@ system which embeds pure Perl code inside its magic tags. The good side of this is that it can get into hash references and objects, and so providing C, C and the Maypole request object will work out just fine. The down side is that C is used to -having all the template variables it wants already at its disposal -through CGI parameters and the like, so we have to fiddle a bit to get -these variables into our template. - - +running more or less standalone, and having all the template variables +it wants already at its disposal through CGI parameters and the like, so +we have to fiddle a bit to get these variables into our template. + +The key to building view classes is C. This is the +base class that you're going to inherit from and, to be honest, it does +pretty much everything you need. It provides a method called C +which returns a hash of all the template variables described above, so +it would be good to feed those into C. It also provides a +C method which turns returns the full filesystem path of the +three possible template paths as shown above. Again, it would be good to +use this as our component paths if we can. It also has some methods we +can override if we want to, but they're not massively important, so you +can see L for more about them. + +The module will do the right thing for us if we agree to provide a +method called C