As you know I got the details.tpl.php to print out the autopopulate link however ideally I would like it to appear in it's own panel. Since I am not really sure how to do that yet I thought I would try using display:none to wipe out the details. However once I added another details panel everything broke.
Fatal error: Cannot redeclare amazon_store_manufacturer_format() (previously declared in xample.com/sites/all/modules/amazon_store/amazon_store_details_panel.tpl.php on line 39
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | amazon_store.details_panel.patch | 6.55 KB | Frando |
Comments
Comment #1
rfayThis is not support that would normally be done here, but I will try to take a look at it next time I work on the module.
In the meantime, why don't you try to solve it? If you look at the tpl.php, maybe you can figure out a workaround that allows it to be used twice. Then post a patch here.
Comment #2
Frando commentedYup, this makes it impossible to display more than one description in a single page load.
The attached patch fixes the problem.
In general, you should not declare function in template files, ever. Template files are supposed to be easily overrideable by themers, and contain as little PHP code as possible. Helper functions belong in the .module file or include files, but not template files. Declaring a function in a template file makes it impossible to use the template twice in a single page load.
Comment #3
rfayExcellent! Thanks, @frando.
@stieglitz, please test and RTBC if it is. Or I'll get to this the next time I work on the module.
Comment #4
rfayCommitted to DRUPAL-6--2.
Thanks so much for the help and the gentle correction, @frando. I have much to learn. Sorry this took me so long to get to.
Comment #5
rfayCommitted to D7: http://drupal.org/cvs?commit=437564
And D6: http://drupal.org/cvs?commit=437562