aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction
diff options
context:
space:
mode:
authorwreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-08-27 19:00:10 +0000
committerwreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-08-27 19:00:10 +0000
commite2c21ec952496f009d22f329a2bd4a378b846cfe (patch)
tree6c8c5c959d650718eff41f7a01101e58233f7daa /lib/Reaction
parentbab6c062a14c634c86144c4dc7031e795230d97b (diff)
parent1b45efc103b064840771676901e2a12606d50df9 (diff)
downloadreaction-e2c21ec952496f009d22f329a2bd4a378b846cfe.tar.gz
reaction-e2c21ec952496f009d22f329a2bd4a378b846cfe.zip
r4572@www43 (orig r1214): mateu | 2009-08-11 09:35:33 -0500
extending Reaction core skins and call_next POD additions. r4573@www43 (orig r1215): mateu | 2009-08-11 10:10:28 -0500 add missing word to Widgets.pod
Diffstat (limited to 'lib/Reaction')
-rw-r--r--lib/Reaction/Manual/Tutorial.pod33
-rw-r--r--lib/Reaction/Manual/Widgets.pod2
2 files changed, 31 insertions, 4 deletions
diff --git a/lib/Reaction/Manual/Tutorial.pod b/lib/Reaction/Manual/Tutorial.pod
index ca0fdc3..46a49c1 100644
--- a/lib/Reaction/Manual/Tutorial.pod
+++ b/lib/Reaction/Manual/Tutorial.pod
@@ -142,7 +142,23 @@ a relative name like
and it would try to extend a skin named C<foo> in your own application's C<share/skin>
directory.
-Now we create C<share/skin/defaults.conf> to allow settings that concern all skins of
+In general, the Reaction distribution provides two skin choices to build upon:
+C</Reaction/default> and C</Reaction/base>. C<base> is Reaction's most basic skin
+while the C<default> skin extends the base by embellishing the layouts with more XHTML.
+The default skin is designed to be a working skin.
+
+In other words, if you want to write most of the low-level XHTML yourself
+then put the following in your skin.conf:
+
+ extends /Reaction/base
+
+If you want to use more XHTML out of the box, then configure your application to extend
+the default skin.
+
+It's worth noting that you are not bound to the XHTML of the default or base skin layouts,
+because you are able to override layout fragments in your own skin.
+
+Next we create C<share/skin/defaults.conf> to allow settings that concern all skins of
the application. It should contain only this:
widget_search_path MyApp::View::Site::Widget
@@ -195,8 +211,19 @@ containing the common C<body> for all pages using this site layout. The C<[% inn
where the deeper parts of the stack will be included, in the case of our C<root> action that
would be the C<Reaction::UI::ViewPort> with the C<root> layout.
-If we wanted to override a specific fragment, we could do just that. And inside that fragment
-we could call C<[% call_next %]> to include the layout fragment from the extended layout.
+If we want to override a specific fragment, we can do just that. There are two choices
+when overriding a specific fragment. One can disregard the parent fragment all together
+and start from scratch or they could reuse the parent fragment and add to it. The key to
+re-using a parent (extended) layout fragment is the keyword C<call_next>. Specifically,
+we insert C<[% call_next %]> to include the layout fragment of the parent.
+
+The parent layout fragment is found either in another layout template named in the
+C<=extends> directive or it's in a subclass of Reaction::UI::Widget.
+In the latter case, the Widget subclass name matches the name of the template or
+the widget name posed at the top of the layout file via the C<=widget> directive.
+
+Once you know the hierarchy C<call_next> follows, then you know where to examine
+the details of the parent layouts or widgets.
The layout representing the root action is called C<share/skin/myapp/layout/root.tt>:
diff --git a/lib/Reaction/Manual/Widgets.pod b/lib/Reaction/Manual/Widgets.pod
index 3e20427..3553391 100644
--- a/lib/Reaction/Manual/Widgets.pod
+++ b/lib/Reaction/Manual/Widgets.pod
@@ -48,7 +48,7 @@ be used to provide the data and some additional control over the rendering of th
This abstracts the data manipulation view logic from the layouting view logic.
-A widget can a new fragment like this:
+A widget can implement a new fragment like this:
package MyApp::Widget::Foo;
use Reaction::UI::WidgetClass;