Can a filter be created that would run the Context Links script on each node?

See http://affiliate-program.amazon.com/gp/associates/network/build-links/co...

Would be a nice thing to have i think ...

Comments

tcblack’s picture

Why not just paste the code into a full html block and place the block in your footer or closure area? Quite a trivial cure.

sevanden’s picture

Because that option makes the contextual relations based on content even outside the nodes, including all additional links which are counted to set set limits to the amount of Amazon links. Aside from that, it would be nice to be able to chose on what nodes you want this script to run ...

tcblack’s picture

I see your point.

eaton’s picture

Rather than using a filter, I'd prefer to set up a module that requests the contextual items when the node is saved, and adds explicit relationships to the node using the amazon_item_node table. Using a filter would be relatively inefficient...

sevanden’s picture

Not a bad idea, but doesn't a filter allow your content to be saved unchanged to the database? The amazon script itself would be looking for the links based on the content of the node as well as the 'up-to-date' suggestions they may have ...

rfay’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rfay’s picture

FYI: I've just added a number of filters. Now everything that is preprocessed in amazon_preprocess_amazon_item() is available through the [amazon ASIN detail] filter.

Docs will be up today, hopefully. http://drupal.org/node/595464

-Randy