At my site I want to pull select book info fields together with the medium sized image... and display in nodes using the filter.
None of the standard templates do this. I can override the existing templates, of course, but then their display is affected in other places where I really want the standard template look.
So, to come up with a solution I thought how about overriding a template I don't use anywhere else at the site? That turned out to be thumbnail. So now I can use the filter [amazon nnnnnnnnn thumbnail] and get my custom look.
But couldn't help but think: how cool would it be to add "custom" to the set of available filters and then a corresponding template? Then in case I want to use "thumbnail" in the future, I can do so.
So the idea would be a filter that works like this: [amazon nnnnnnnnnn custom] and a companion template called amazon_custom.tpl.php to theme the output.
Comments
Comment #1
rfayThe 3rd parameter of a filter is already taken and already a bit ambiguous (for specific data elements). But perhaps there could be a new filter...
Remember that people using Amazon CCK fields might want this level of control also.
Comment #2
aharown07 commentedThanks for the response.
I'm not clear on what most of that means, though. The third parameter can't take any more options? Maybe I wasn't clear. The idea is that "custom" would be the third parameter instead of "thumbnail" or one of the others. But "user" or "x" or just about anything else would be just as good.
Comment #3
rfayPlease take a look at the filters provided at http://drupal.org/node/595464#filters and see how overused that third parameter to the filter already is :-)
Comment #4
aharown07 commentedIt's mighty busy, no argument there.
I wonder if one super-flexible third parameter could eliminate the need for several of those. No idea how everybody uses them though. In my own case, I've used half a dozen of them in combination to achieve what I do now with a template override and a single filter statement.
But perhaps my situation is unusual and not a good approach for most.
Comment #5
rfayThe other problem is that if we're going to solve your problem we need to solve it for people using CCK (ASIN) as well. So I'd rather come up with a more generic solution.
For your problem alone, we could create a new filter (not just [amazon]) that does new things, and grandfather the old [amazon] in, rather than adding complexity to it.
Comment #6
aharown07 commentedI'll stay tuned. Thanks
Comment #7
rfayPatches are welcome on this one folks.