Closed (fixed)
Project:
Amazon Product Advertisement API
Version:
7.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Nov 2011 at 15:10 UTC
Updated:
3 Nov 2012 at 21:29 UTC
I'm using Display Suite to generate a page.
Here I have a amazon field called ASIN. I display it using "link-to-item."
I have copied a version of "amazon-inline-item.tpl.php" to my own template folder.
For some reason I can't get it to read from that tpl file in my theme.
Any suggestions?
Comments
Comment #1
rfayPlease try just copying/changing the template *without* display suite to see if Drupal knows how to do the right thing. It's possible there's a problem in hook_theme() or something.
Comment #2
madeby commentedSadly this is very hard for me to test on this solution.
But is it correct that I just copy it? No need to rename it in some way?
It works with the field tpl. Where I use it as:
field--release.tpl.php
The content type is called "release"
Comment #3
rfayCopy the file into your active theme and flush the theme registry (drush cc all).
But I don't guarantee that amazon-inline-item.tpl.php is the theme function for a field set to "link to item". You'll have to take a look and see what the correct theme tpl is. Look in the formatter in the asin module.
Comment #4
madeby commentedIt is the asin_inline so it should be the one.
Can it be a Amazon Storage Cache thing? Tried to edit the tpl in the amazon module folder. Nothing happened.
Comment #5
rfayYou do have to clear the theme registry after moving files around, but you shouldn't have to do anything to change the tpl.php in the Amazon directory.
Comment #6
madeby commentedThis is so strange. The other templates seems to work but not the inline one. The reason I know it is the correct tpl is that it is the only one with span tags.
Can it be that it is rendered from within the module and has no template?
Comment #7
madeby commentedFor some reason the file in my module folder was named incorrectly.
If this is the case in the rc1 release it needs to be changed.
The correct name is:
amazon-item--inline.tpl.php
Comment #8
rfayPatches are always welcome.
How did the field get themed at all then?
Comment #9
madeby commentedHave no idea. This is very strange but it works with amazon-item--inline.tpl.php.
Do not know if it is a DS issue.
Comment #10
willvincent commentedThis seems to have been resolved already based on previous comments..
However, for the record. This patch ensures the tpl should be named amazon-item--inline.tpl.php which follows the naming convention of the rest of the tpls.
Marking this fixed.
Comment #11
willvincent commented