CityChanger - a window of a choice of a city in Joomla Joomla 3.x
City Changer - a window of a choice of a city in Joomla 2.5 and 3.x
CityChanger - a window of a choice of a city in Joomla
Module and plug-in City changer - allows you to emphasize your branches in different cities in order to increase sales. The module for CMS Joomla, allows you as an administrator of the website to display different cities in a pop-up list. The extension is compatible with multilanguage modules, but for this you need to create for each language your copy of the module mod_citychanger.
We tested this extension on the Joomla 3.5.1 version, but it will work just as well on the Joomla 2.5 version!
How does it work? The principle of activity is relatively elementary. When you enter the page (it is possible to disable), your visitor sees a pop-up window based on geo-location principles (possibly disabled) and a list of cities in which there are your branches or offices, thereby selecting the contact information for the city ( addresses, phone numbers), as well as the ability to go to a subdomain for the city, such as vologda.site.ru or sichi.site.ru, or according to a special tag (which can be set in the module settings), for example site.ru/vologda ( attention, creating this page anisi necessarily), from within which there must be information for the purpose of the corresponding metropolis. The extension operates with special tags, inside which information for the corresponding city should be contained.
Telephone: [city Minsk]+4 172 555-66-77[/city][city Paris]+4 162 444-55-66[/city]
On one page of submarine tags there can be not a few, but on the site you will see information only from those tags that correspond to the current selected city. The action of tags is not limited to materials only, you can use them even in template files. For example, you can display different module positions for different cities.
[city Kiev]<jdoc:include type="modules" name="position-kiev" style="none" />[/city] [city *]<jdoc:include type="modules" name="position-all" style="none" />[/city] </div>
In this way, "position-vologda" with all its modules will be displayed only for Vologda, and the second position - for all other cities.
We provide a full list of possible options for using the tag:
- One city [city Misk]
- Several cities [city Minsk, Kiev]
- All cities [city *] - more precisely any except those specified explicitly in other tags of the current page
- Any city except the indicated (negation) [city! Norilsk]
- Any city other than those specified [city! Voronezh, Rostov]
Note: applying these tags in the editor, try not to indent and carry out among the specified tags of the 1st metropolis and revealing another, because there are all chances to arise unnecessary padding or hyphenation (the co-editor automaton changes the html word texture and has the ability to place among the tag unnecessary tags).
The extension setup consists in the initial installation of the plug-in and the module. The plug-in needs to be activated. After (immediately) switch to the module options. Significant characteristics of the module reside only in the main tab options, but in the tab of additional characteristics is the item "adding a callback."
Consider the characteristics according to the order
Primary Domain - Required for proper development of subdomain addresses. Automatic establishment of the main domain (if it is specified earlier in the subdomain) functions only if the site has a second-level domain (site.ru).
By and large, this meteorological parameter is entered automatically (the value of the name of the current host is taken as the value).
Selecting a city when you visit the site
If this option is set to the mark - YES, then at the first visit the site
To the site, the module will invite him to select a city from the pop-up window.
Please note: if this option is enabled, yandex-geolocation will not work, because there is a conflict between the automatic definition of the city and the user's choice.
In the module there are several ways to configure the geolocation and determine them. If an automatically defined city is in the list (module settings), then a content switch or a redirect to the corresponding subdomain occurs.
The following options are available:
- SypexGeo - definition of a city by IP with the help of an appropriate service
- Yandex Geo - definition of the city by means of a link between the browser's geolocation mechanism and the definition of the city by coordinates via the Yandex geocode-maps service
- a bunch of SypexGeo + YandexGeo, when the first is used as a faster definition, and the second, like a control shot
List of cities
It is an interactive table consisting of 4 columns:
- town - by default (this or that town will be displayed if it can not be installed automatically)
- the name of the metropolis or the category of cities the name of the subdomain
and either a URL-prefix to give an alias of pages (for example "/moscow/" or "/spb/"), as well as additional actions "delete a line" and "move a line"
Note that the main city page is not set, because the site can not have a home page (the root of the site). Thus, the main page of the site is the main page of the city specified by default. For a better understanding, I'll show you how the structure of such a site should look.
/ (Homepage for Moscow)
Are you afraid that you will have to create duplicates of each page from the main city? You are mistaken! In fact, it is enough to create pages only for the main city, and pages for other cities are all the same pages of the main city, but with other URLs.
The fact is that the structure of the site is set through the "Menu" component, hence it is enough for each city to make its own menu, but assign its prefixes to page addresses (/about-company -> /spb/about-company).
That is, the menu copying the main city's menu should be displayed in the root of the city of St. Petersburg (/spb/), but with address prefixes.