Separate Home Page for Localization

Good Morn,



I am building a site for a client who would like to have a separate home page for each of their 3 geographical localizations.



I finally fixed the multiple bugs in the localizations, so now its on to enabling a separate landing page (home page) for each that reflects the geographical differences.



Has anyone done this successfully? I’ve had No luck searching the knowledge base or forums.



Thanks

Again, version you are using would be helpful.



I would do it this way:

  1. Enclose the div with a class of ‘central-content’ from skins//customer/main.tpl inside of hook tags like:

```php

{hook name=“index:central_content”}


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

{/hook}
```

Create a file named skins//customer/addons/my_changes/hooks/index/main_content.override.tpl

In that file do:
```php
{if $controller == 'index' }
{if $lang.lang_code == 'EN' }
english html here
{/if}
{if $lang.lang_code == 'FR'}
french html here
{if}
{else} {* not index page, use original *}

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

{/if}
```

etc....

Alright, I’ll give it a go

And thanks alot for your help Tbirnseth! :smiley:

Of course, a large thank you was implied, in my abbreviated response.



Quick question though, what if I am not using the lang_code to distinguish between which pages to display, but rather the localization (based on geopgraphy).



What I mean is that English will be the only language available for some time, so I couldn’t really use that in an if statement to decide which code to display, right?

I’m running version 2.1.1 and there is no



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




its



{block group="centra"]




That didn’t work, but I appreciate the direction

Receive Error on non-index page



Warning: Smarty error: unable to read resource: "/index/skins/solitude/customer/common_templates/breadcrumbs.tpl" in /home/kwicknsa/public_html/index/lib/templater/Smarty.class.php on line 1095

Sorry, my crib notes were probably based on 2.0.15… Milage may vary under 2.1. But you should be able to use the same conceptual idea to implement under 2.1.



Yes, you can use the localiziation. The template variable $localizations has 3 localization sub-elements of ‘countries’, ‘currencies’ and ‘languages’. So you can “conditionalize” on which ever one is appropriate for your needs.

Thanks to Dmitriy K at CS-Cart Tech Support for providing a common sense solution to this issue.



Many, many thanks.

Care to share?

Of course I will.



It was actually along the same direction that you pointed me in with the use of language, however, in this particular manner no hook or mod was needed.



This will show how little I really understand about the inner working of CSC but all he had me do was install 3 languages and then change the html block on my home page and save it after changing to a different language localization.



IT never occurred to me to do this because all three of the countries that my client’s site is going to serve have English as the predominant language.



I thought I needed 3 different blocks and I only really needed one block saved differently in each of the 3 languages (all English).



Viewable here @ [URL=“http://www.kwicknsafeweightloss.com/index/”]http://www.kwicknsafeweightloss.com/index/[/URL]