Hi,
The STOP only stops the user_modify_link to happen. After that, the program will display either the success or error page. If you want to display a different template, you need to override one of those pages.
You could do this:
my $results = shift;
..
GT::Plugins->action ( STOP );
return $results;
}and then:
my $tags = shift;
GT::Plugins->action ( STOP );
return Links::load_template ('new_template.html', $tags);
}So the first one overrides the modify code, and the second one overrides the success page with your page.
You could make it conditional by doing something like:
my $tags = shift;
if ( .. ) {
GT::Plugins->action ( STOP );
$tags->{override} = 1;
return $tags;
}
return $tags;
}
sub plg_site_html_modify_success {
my $tags = shift;
if ($tags->{override}) {
GT::Plugins->action ( STOP );
return Links::load_template ('new_template.html', $tags);
}
return $tags;
}So you set $tags->{override} = 1 if you want to print a new template. Then your pre hook for modify_success checks to see if override was set, if so it aborts the regular template and prints out what you want.
Does this make sense, and help you do what you want?
Cheers,
Alex
--
Gossamer Threads Inc.
The STOP only stops the user_modify_link to happen. After that, the program will display either the success or error page. If you want to display a different template, you need to override one of those pages.
You could do this:
Code:
sub plg_user_modify_link { my $results = shift;
..
GT::Plugins->action ( STOP );
return $results;
}
Code:
sub plg_site_html_modify_success { my $tags = shift;
GT::Plugins->action ( STOP );
return Links::load_template ('new_template.html', $tags);
}
You could make it conditional by doing something like:
Code:
sub plg_user_modify_link { my $tags = shift;
if ( .. ) {
GT::Plugins->action ( STOP );
$tags->{override} = 1;
return $tags;
}
return $tags;
}
sub plg_site_html_modify_success {
my $tags = shift;
if ($tags->{override}) {
GT::Plugins->action ( STOP );
return Links::load_template ('new_template.html', $tags);
}
return $tags;
}
Does this make sense, and help you do what you want?
Cheers,
Alex
--
Gossamer Threads Inc.