I was expecting that if I copied the banner_output_template.tpl.php file into my theme I would be able to override the output. This is not the case. It is necessary to change the template file because the default has hard-coded image widths, heights and other elements that are likely not needed by most. I'd either like to suggest making override possible, or cleaning up the core template file to be generic & not include these hard-coded items.
Comments
Comment #1
coolestdude1 commentedRoger that, the template file is supposed to be overwritten by the user but I agree it should go in your theme so that the module can update without you having to worry. I need to poke around a bit so as to get this in the next release.
Comment #2
coolestdude1 commentedOk to answer these lingering questions,
I took out the fixed widths/heights from the output make sure you set them somewhere with css in your theme by targeting the banner ids.
Since the banner outputs all of the banners in a block you should be able to do a block.tpl.php for this to override it further.
You are also always welcome to suggest things in feature requests here for changes to that versioned file. Or keep an altered one in your module folder and same goes for css. Always keep a backup to update to the latest copy.
The template file is loaded from the theme function hook in the .module you could also alter this file personally to load your own template in your theme then just use the provided variables to accomplish the same thing. Hope that helps.
Comment #3
altrugon commentedHi there,
First of all thank you for your work, I know to create and maintain a module is not an easy task.
I basically run into all the problems listed on your issue queue with the recommended release version so I tried to use your dev branch and finally I was able to see some output. However this also require some work and one of them was to make sure my image was the right size, which require to override your template and doing this I found another issue.
The template file is named
banner_output_template.tpl.phpbut in your theme function you have gave another name to the theme function:This means that if you try to copy the template into your own theme it will never be called at least you rename it to
banner_output.tpl.phpI would suggest to remove "_template" from this equation.
Thanks.
Comment #4
coolestdude1 commentedAgreed I need to look this over thoroughly because I have seen a module that does this really well that I would like to take a chunk of and implement. This of course will take me a bit of time as this is my companies most busy time of year but alas I will try to be as active as possible for everyone. Sorry about the lag time hopefully soon I will be able to continue to put features together.
Comment #5
coolestdude1 commentedJust submitted the fix into the repo thanks.
Comment #6
organicHack commentedThanks guys,
From altrugon's comment, I was able to create a directory "theme/templates/dynamic_banner" then put "banner_output.tpl.php" inside it. worked like a charm. I like to keep all my template files in subdirectories (node, page, field, view, etc) for organizational reasons.
Very very useful module!