Different home page layout PLEASE HELP!

Hi guys.



I’m trying to configure my template so that the home page content area has a specific class applied so I can display content without any padding.



How can I target the home page specifically with smarty so as to display two different versions of the ‘central-column’ div (in /customer/main.tpl).


```php



{include file="common_templates/breadcrumbs.tpl"}
{include file="`$location_dir`/central.tpl"}


```

I'm trying to add a class to the central content div to differentiate it for the home page: eg.
{if home page} home-page{/if}

If anyone can PLEASE help, I would greatly appreciate it.

The following free local addon ([url]http://www.ez-ms.com/products/local-addon.html[/url]) will allow you to use “controller specific” css files. Hence you can load one css file when the index page loads and a different one when the checkout page loads. This will alllow you to use different style definitions depending on the “context” (controller) being used.



css files are kept in skins//customer/addons/local/css directory and are named like index.css, checkout.css, categories.css, etc.



Note that if you enable this option you should install an empty file for every controller otherwise you’ll get a noisy error_log about “file not found”.

Hey you could use this syntax



{if $mode == ‘index’}

blablabla

{else}

blablabla

{/if}

[quote name=‘OknooRap’]Hey you could use this syntax



{if $mode == ‘index’}

blablabla

{else}

blablabla

{/if}[/QUOTE]



Not in a CSS file which is what I understood he wanted to be specific to the controller.

[quote name=‘tbirnseth’]The following free local addon ([url]http://www.ez-ms.com/products/local-addon.html[/url]) will allow you to use “controller specific” css files. Hence you can load one css file when the index page loads and a different one when the checkout page loads. This will alllow you to use different style definitions depending on the “context” (controller) being used.



css files are kept in skins//customer/addons/local/css directory and are named like index.css, checkout.css, categories.css, etc.



Note that if you enable this option you should install an empty file for every controller otherwise you’ll get a noisy error_log about “file not found”.[/QUOTE]



This is interesting. So you just place the downloaded files in the right folders, install the addon, make new css files in skins//customer/addons/local/css directory… and then what? Do you have to write in hooks to the tpl files? I’ve had limited success with that in the past. I’d love a quick explanation of how this works if you have a minute.

To be specific…

  1. unarchive the archive in the root directory of your store. All files are then in the right places.
  2. Install the addon from Administration/Addons in the admin panel
  3. Click "edit’ for “Local Configuration” and the check the checkbox that say “Use controller specific CSS files” and click Save.
  4. Create/edit you css files. They will be loaded automatically from the single “post hook” in skins//customer/addons/local/hooks/index/styles.post.tpl.

Excellent. Thanks for the heads-up. I’ll give it another try and see if I can wrap my brain around it.