Gossamer Forum
Home : Products : Gossamer Links : Discussions :

question regarding hooks

Quote Reply
question regarding hooks
Hi,

I read this following information, which was provided by Alex:

-------
PRE hooks

They get passed in a single hash reference of all the template tags that would appear on that template. So for site_html_add_success template you would get a hash ref of the entire link that was just added. The plugin can alter that hash ref to add tags, or change values. So if your plugin wanted to add the word 'foo' to the Title when displaying a link that was just added, you would do:

sub add_foo {
my $link = shift;
$link->{Title} = $link->{Title} . 'foo';
return $link;
}

-------

How could I see to it that the 'foo' would also be added to their title so when I need to validate it, it would be in the format of "Titlefoo".

This would be a add_link POST hook, correct?
What would my subroutine look like to add the foo to their title so that it appears with the foo in the Validate table?

Thanks.



Robert Blackstone
Webmaster of Scato Search
http://www.scato.com
Subject Author Views Date
Thread question regarding hooks Robert_B 3273 Feb 2, 2001, 8:31 PM
Thread Re: question regarding hooks
pugdog 3143 Feb 2, 2001, 11:57 PM
Thread Re: question regarding hooks
Robert_B 3135 Feb 3, 2001, 5:45 AM
Thread Re: question regarding hooks
Alex 3150 Feb 3, 2001, 8:15 AM
Thread Re: question regarding hooks
Robert_B 3122 Feb 3, 2001, 3:26 PM
Thread Re: question regarding hooks
pugdog 3099 Feb 4, 2001, 11:55 PM
Post Re: question regarding hooks
Robert_B 3094 Feb 5, 2001, 3:49 AM
Thread Re: question regarding hooks
Alex 3091 Feb 5, 2001, 2:50 PM
Post Re: question regarding hooks
Robert_B 3125 Feb 5, 2001, 3:02 PM