Couple Of Questions About Layout & Blocks

In layout when editing HOMEPAGE I see the is a block “main content”. It's simple to see what this does on other pages but if I disable on HOMEPAGE it seems to have no effect. I'm thinking if this is disabled less code will be parsed so it'll save some loading time. am I being stupid ?



Also on the home page I would like to try to put a banner block above the main menu. I want this only on the home page. Is that possible without code changes.

Hello,


[quote]In layout when editing HOMEPAGE I see the is a block “main content”. It's simple to see what this does on other pages but if I disable on HOMEPAGE it seems to have no effect. I'm thinking if this is disabled less code will be parsed so it'll save some loading time. am I being stupid ?[/quote]



By disabling this block you just save several nanoseconds.


[quote]Also on the home page I would like to try to put a banner block above the main menu. I want this only on the home page. Is that possible without code changes. [/quote]



[color=#282828][font=arial, verdana, tahoma, sans-serif]Unfortunately, it's impassible, some code changes are required. [/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]It is necessary to edit “[/font][/color]design/themes/{your_theme}/templates/addons/banners/blocks/carousel.tpl” file. Just replace this line:

{if $items}

by this one:

{if $items && $runtime.controller == 'index' && $runtime.mode == index}



[color=#282828][font=arial, verdana, tahoma, sans-serif]Sincerely yours,[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]CS-Market.[/font][/color]

Thanks, a saving is a saving :-) perhaps the are more blocks that can be disable too.



Thanks for the code, didn’t want to touch code as more then likely I’ll decide I want to change it back but if it’s that small might have a good at that. thanks again.

Perhaps I didn't make myself clear but that code does not seem to have done anything in the layout on edit Homepage. I was expecting to be able to see the main menu and be able to move the banners block above it.

1.png

2.png

[quote name='kickoff3pm' timestamp='1423659931' post='204993']

Perhaps I didn't make myself clear but that code does not seem to have done anything in the layout on edit Homepage. I was expecting to be able to see the main menu and be able to move the banners block above it.

[/quote]



It will be required to add this block to the header of the default location. You can just create a new wrapper for this block. E.g. create a new file:



design/themes/YOUR_THEME/templates/addons/my_changes/blocks/wrappers/index.tpl



with the following content:



{if $runtime.controller == 'index' && $runtime.mode == 'index'}
{$content nofilter}
{/if}




Clear the cache and select new wrapper for the block with banners. Hope this will help.

This why I didn't really want to change the code. Can't get this working, can't see the new wrapper in the wrapper options for the banners block. Really not sure if My changes is working in 4.2.2 to be honest. This is the second one that has no impact.



I'll have to leave it for now, sorry for wasting your time but really big thanks for trying to help with this.