Bigtop

 view release on metacpan or  search on metacpan

lib/Bigtop/Docs/TentRef.pod  view on Meta::CPAN


Check this box, if you no longer want to regenerate for this controller.
No new GEN files will be written for it.  Everything else here will be
ignored.

=item location

Specify an absolute location for this page from the document root of
the web server.

You must specify either a location or a rel_location for each controller.

=item rel_location

Specify a location for this page relative to the app's base location.
You should control the app's base location in the base controller.

You must specify either a location or a rel_location for each controller.
The base controller is an exception.  It does not allow a rel_location,
since there is nothing for it to be relative to.  Further, it has a
default location of /.

=item controls_table

The name of the table controlled by this controller.

=item gen_uses, stub_uses, uses

List any modules you want to use in your controller modules here.
Modules in the gen_uses list are used only the GEN module.
Modules in the stub_uses list are used only the stub module.
Modules in the uses list are used in both, but keep in mind
that stub modules are not regenerated.  So, adding to these lists after
generation will not add use statements to the stub.

=item text_description

What fills in the blank in questions like 'Delete this ____?'

=item page_link_label

Supply this, if you want the page to appear in site navigation.  The value
is the link the user will have to click to come to it.

=item autocrud_helper

Most of the time bigtop supplies the proper ORM helper for Gantry's AutoCRUD
scheme without intervention (providing you check the For use with DBIx::Class
on the Control Gantry backend as appropriate).  If you want to use
a different helper, supply it here.  See
C<Gantry::Plugins::AutoCRUDHelper::DBIxClass> for an example of what to do.

=item skip_test

Check this if you don't want a default page hit test for this controller.

=back

In addition to the statements that affect the whole controller, there
are methods in it.  Methods come in seven types, shown below.
There are two statements they all understand: no_gen (take a guess)
and extra_args.  Any extra_args -- and you can have as many as you like --
are added to the argument list in the generated routine.  Be sure to
include full perl variables, including sigils:

    $id
    @variadic

If you include an array, put it at the end, remember that arg handling
is greedy.

Here are the method types and what's unique about them:

=over 4

=item stub

This makes an uninteresting sub, which can save some typing.  It has no
special statements.

=item main_listing

Makes a do_main style method which displays the rows from the controlled
table something like this:

=for html <img src='http://www.usegantry.org/images/tenttut/main_listout.png' alt='sample main listing' />

    http://www.usegantry.org/images/tenttut/main_listingout.png

What you see when you expand a method for editing depends on its type.
You should only see the statements suitable for methods of the selected
type.  (If you change the type of an existing method, you will have to
request a page refresh for the available statements to change.)
For main listings you'll see something like this:

=for html <img src='http://www.usegantry.org/images/tenttut/mainlistedit.png' alt='sample main listing' />

    http://www.usegantry.org/images/tenttut/mainlistedit.png

=over 4

=item order_by

A valid SQL ORDER BY clause for a select from this table alone.

=item rows

The number of rows to include on each main listing page.

=item paged_conf

An accessor which returns the number of rows to include on each main
listing page.  Frequently, this is a conf variable of the same name,
but that is up to you.

=item cols

These are the fields you want to display to the user.  Refer to them by their
field name in the controlled table.  List as many as you want.  Extra boxes
will appear when you fill up the ones intially shown.



( run in 0.941 second using v1.01-cache-2.11-cpan-f56aa216473 )