[development] access to $node in hook_fillter()

Gabor Hojtsy gabor at hojtsy.hu
Sun Jul 16 10:35:55 UTC 2006

On Sat, 15 Jul 2006, [iso-8859-1] Bèr Kessels wrote:

> Does anyone know a trick (or something I shouldve read, but did not read)
> about how to get acces to $node objects in hook_filter?
> My filters do not alter anything in that object, but the filters /do/ need
> some parameters in that object.
> As far as I can see, _filter only receives a 'stupid' text-chunk, but I cannot
> beleive that we designed it that stupid and never pass more information to he
> filters. Its just that I cannot find the wheres, hows and whens.

I tried to get a patch in, which would pass the node along. But filters 
are not only used for node text. They are used for the site mission, node 
add page help texts and such.

The answer to this question then was that I should use nodeapi view to do 
node based filtering. This is what I do.


More information about the development mailing list