The attached file adds views support to the amazon package.

CommentFileSizeAuthor
#3 amazon_views_0.inc2.77 KBeaton
#1 amazon.module_1.patch554 byteseaton
amazon_views.inc2.09 KBeaton

Comments

eaton’s picture

StatusFileSize
new554 bytes

And this one includes the file if views.module is present.

Prometheus6’s picture

Thanks. I'll review this quickly.

eaton’s picture

StatusFileSize
new2.77 KB

Actually, here's an updated version of the amazon_views.inc file that adds a filter: 'has amazon link.' That allows people to build lists of nodes that include links to amazon items, regardless of the node type.

Prometheus6’s picture

Seriously, does that cover integration with the views module? I haven't looked at it yet.

eaton’s picture

It certainly seems to. I have a sample view exposed right now on my blog -- http://jeff.viapositiva.net/amazon ... It filters to list only nodes with an associated ASIN, and lists the book title as a clickable link, the price, etc. There might be sneakier tricky bits to add in later, but it does cover all the views bases I can think of.

Also, because it's kept in a separate file and only included if views.module is installed, there's little code bloat for the core amazon module.

Prometheus6’s picture

Status: Needs review » Closed (fixed)

One patch committed, one include file added.