Discussion:
[Mtamazon] Linking to search results (long)
Rebecca Blitch
2005-03-14 15:32:50 UTC
Permalink
I'd like to use MTMacro with MTAmazon to create a system whereby I can
create links to Amazon search results on-the-fly in my entries. (I've
already got a similar macro for linking to individual items that works
quite well.)

I'd like to be able to type <amazon search="barenaked
ladies">BNL</amazon> and have a link to the search results for
Barenaked Ladies returned (with "BNL" as the link text). Intuitively,
I think the macro should look like this (which is very similar to my
*working* item link macro):

<MTAmazon search="[MTMacroAttr name='search']" method="Keyword"><a
href="<MTAmazonLink>"><MTMacroContent></a></MTAmazon>

But that produces a link to a book about the band (with the link text
being the phrase "BNL") repeated ten times. (This is the html
produced: <a
href="http://www.amazon.com/exec/obidos/ASIN/0769215793/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/0743238354/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/0757991432/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/0769268374/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/075790226X/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/0769201997/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/0291566715/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/6308006955/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/6306344535/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a><a
href="http://www.amazon.com/exec/obidos/ASIN/6305997845/gobecky-20?dev-
t=0EFNE5H9EEWG2DEZGW02%26camp=2025%26link_code=xm2"><span
class="caps">BNL</span></a>)

Ok, so I understand the logic of what's being produced (in that the
default line is books, and the default number of searches is 10). I
understand how I could change the search attributes to return the top
CD. But that's not what I want. :)

I want, to begin with, an all products search, and I want the link
produced to be to the search results page (like this one:
http://www.amazon.com/exec/obidos/search-handle-url/ref=pd_kk_sr_1/103
-0717442-1261430?index=blended&field-keywords=barenaked%20ladies except
including my assoc. id).

So: Can this be done with MTAmazon? If so, how? If not, does anyone
have any suggestions as to other plugins to do this job? Or, how I can
just manually construct the URL's?

Thanks for any ideas you might have...

Becky B.

Loading...