On 10/11/05, Aaron Trevena <[EMAIL PROTECTED]> wrote:
> Hi dave, david, peter
>
> has there been any progress on this?


No . We were waiting for you. :)  Dave has written a nice, robust
plugin with docs that  has more than there  is time to put in core
right now.  For core Maypole in 2.11 or 2.12 (depending on what
depends on this) I think  a simple make_path that does the opposite of
parse_path is desirable. And to that end  what a Dave says here
(admirably articulate I might add) regarding a shared path template is
the hard part :

> I'd like to see this in core, because then we can document path making
> and URL parsing in the same place, and emphasize the advantages of
> using these methods for all path manipulation. Also, there's the
> potential for make_path and parse_path to both use a shared path
> template, so the whole path scheme could be changed at a single point.

The method name and docs are easy:

=head2 make_path

    $path = $r->make_path($table_or_template, $action_or_template,
$args, $query)

This does the opposite of parse_path -- makes a path to be used in a
uri out of the arguments. All args are scalars except for $query which
is a hash ref.  The arguments are constructed into a path according to
the. The resulting path is not a uri and begins with a '/'.   See
<C>shared_path_template.  *NOTE*  To override the form of paths in
your application override the <C>shared_path_template.

=cut

sub make_path {
     my ($r, @args);
     return $r->shared_path_template('make', @args);
}

=head2 shared_path_template

  shared_path_template('parse', $path);
  shared_path_template('make',@args);

This determines the format of paths  in your application. A path can
be defined as  the part of the uri that comes after the <C>uri_base
configuration variable in your application.  Override this to set that
format and not parse_path or make_path.

=cut

sub shared_path_template {
       my ($r, $do)  = shift, shift;
       if ($do eq 'parse') {
                #same parse path
        }
        elsif ($do eq 'make') {
               # something sensible
               return $path;
        }
}



Does that sound about right?

> I'm looking through the outstanding bugs in rt.cpan.org we still don't
> have link() working correctly for search requests with =s in fields.
>

??? =s in fields ??  I noticed my search was not working. is it your
fault?  :-) .  I seriously doubt it since i overrided search.  My
problem is when I try to sort on a column in the results of a Search,
It ignores the "prerequired" value for that column (ie Search on
employee_id = 2 gives a listing of just employee 2 rows. But in that
listing when i click the employee_id heading to sort it asc or desc, i
get all employees again. Even though "&employee_id=2" is in the query
string.


cheers,

pjs
P.S.. I am officially done with this email. Its possible i sent
several duiring compilation. I blame GMAIL and Kinesis keyboards. 
GMAIL for putting the "Send" button as the first tab from the
Composition box. They could have put the "Save Now" button there. And 
Kinesis Keyboards for putiing the "Enter" key right next to the
"Space".


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to