Author Topic: How is which banner_block.tpl used determined?  (Read 3162 times)

Offline dhigz

  • Newbie
  • *
  • Posts: 42
  • Karma: +15/-0
    • View Profile
    • My AbanteCart Site:
How is which banner_block.tpl used determined?
« on: November 20, 2014, 03:19:10 PM »
I downloaded and installed template578. There are some issues that need to be addressed and I will send feedback when I am finished vetting it. This question has to do with the main page intro banners and how which banner_block.tpl is used.

Out of the box, the main page intro banners worked fine. The block being used was /extensions/template578/storefront/view/template578/template/blocks/banner_block_scroller.tpl and it worked great. I disabled then deleted the banners from the banner manager and replaced them with my own. Now all of the banners show up one after the other instead of being scrolled. It appears the block being used is not one in the template578 folder but coming from /extensions/banner_manager/storefront/view/default/template/blocks/banner_block_content.tpl.

How and which banner_block.tpl determined when a page loads?
How do I change this so the correct template is used?

Don Higbee

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4751
  • Karma: +246/-2
    • View Profile
Re: How is which banner_block.tpl used determined?
« Reply #1 on: November 21, 2014, 04:11:37 AM »
Hello.

We can not replicate your issue. You dont need to modify banner block and leave block wrapper: Automatic.
What you need to do is Add new Graphic banner and assign it to Banner Group Name: Intro banners

Please see attached scrennshot with banner block settings and new slider settings

Offline dhigz

  • Newbie
  • *
  • Posts: 42
  • Karma: +15/-0
    • View Profile
    • My AbanteCart Site:
Re: How is which banner_block.tpl used determined?
« Reply #2 on: November 21, 2014, 04:30:29 PM »
Exactly what I have done. The only thing different is I changed the name of the Block name and title, which by all rights should not be an issue. I tried deleting the block and recreating it, but still the same. I also did not mention in the original post that there is no javascript/jquery added to the page to control the banners.

Incidentally I did get a warning message: 2014-11-21 18:55:36 - warning:  AbanteCart core v.1.1.9 Invalid argument supplied for foreach() in <b>/[cut]/admin/controller/pages/design/blocks.php</b> on line <b>553</b>.

I can't seem to post the code snippet, but $tpls is undefined as there is no /html_block folder in the file structure. Take at the /html_block reference in $tpls and $pos and the warning goes away. I do not believe this is a contributor to my problem as I created the block with and without the change and got the same result.

Is there a way I can influence which block template is used when the page is created? Perhaps in the database?

Thanks.
Don Higbee

Offline dhigz

  • Newbie
  • *
  • Posts: 42
  • Karma: +15/-0
    • View Profile
    • My AbanteCart Site:
Re: How is which banner_block.tpl used determined?
« Reply #3 on: November 22, 2014, 12:01:36 AM »
OK, I found it. The name does matter. You have "Intro banners" actually hard coded in template578.php file. With the way this program is written, it's pretty interesting that to make it work it comes down to hard coding a name.

Works good now.
Don Higbee

 

Powered by SMFPacks Social Login Mod