Hi,
No, this won't work. The program flow is:
1. Run all PRE hooks.
2. Run main code that generates the category list page. It returns $template_name, $template_vars, $template_opts.
3. Run all POST hooks.
4. Print $template_name with $template_vars
So if you are just looking at adding a new tag and not change the functionality of the home page, you want to add a POST hook that looks like:
Code:
sub my_post_hook {
my ($tpl, $args, $opts) = @_;
$args->{mylist} = '.....';
return ($tpl, $args, $opts);
}
So you basically just added a new template tag. If you wanted to replace the functionality of the home page, you would do a PRE hook that looked like:
Code:
sub my_pre_hook {
my $do = shift;
GT::Plugins->action ( STOP ); # Don't run main code.
... # Your code here
return $template, $args, $opts;
}
And the program will print out $template with $args as options.
Let me know if this helps,
Alex
--
Gossamer Threads Inc.