Blog

/

Instructions

/

Settings the Theme “Basis”, Part 2

Settings the Theme “Basis”, Part 2

The directory structure of the Theme.

The directory structure in which the theme is located:
  1. assets - here are the main styles, images, fonts and javascript of this theme
  2. css - here are additional styles
  3. helpers – here is the theme widget code
  4. images – here are additional images
  5. js - here are additional javascripts
  6. views/layouts – here are the main theme layers
  7. views/modules – here are template files for various site modules
  8. views/site - here are template files for main page, login page, registration page, password recovery and search form.

To understand how layers work in the layouts folder, consider the main layer in the file layouts/main.php

Gray and blue are parts of the main.php layer. They are displayed on all pages of the site. 2, 3, 4 these are parts of the template that may be various on different pages of the site. As a rule top and lower part from files header.php and footer.php remain the same on all pages of the site. Only the middle block is changing – 3. Template main.php is used for the home page, file inner.php is used for internal pages.


Home page

Home page
  1. The top menu is configured in the admin panel in the section - “Content” - “Menu items” - “Header- Template: Basis” Menu Basis
  2. Menu under logo is configured in the same place “Top - Template: Basis”
  3. How to change logo we considered in the previous article - /en/blog/instructions/setting-theme-basis
  4. Site currency selection widget. It is displayed if 2 or more currencies are active on the site. You can set up currencies in the “Languages and Currency” section - “Currencies”. This setting is only in the paid versions of the site. The code responsible for displaying the currency selection widget is in the file - themes\basis\helpers\BasisCurrencySelector.php
  5. Widget of language selection of the site. It is displayed if 2 or more languages are active on the site. You can set up languages in the “Languages and Currency” section - “Languages”. This setting is only in the paid versions of the site. The code responsible for displaying the language selection widget is in the file - themes\basis\helpers\BasisLangSelector.php
  6. Drop-down menu to go to the user's personal account or admin panel. There are also links to register a new user and a password recovery page.
  7. Selectors of choosing the type of transaction in the form of a search - “Sell”, “Rent”, “Exchange”. Transaction types are configured in the section - “Settings” - “Listings” Selectors of choosing the type
  8. Listings search form. It can be configured in the section “Modules” - “Forms editor” - “Edit the search form”. This feature is available only with the “Extended form editor” module. This module is included in the PRO and Ultimate product editions.

Slider widget and popular directions

Slider widget and popular directions

If there is a “Slider” module, slider pictures can be managed in admin panel. With a module "Paid services and payments" in the slider you can add a listing picture using a paid service “Add to the slider on the home page” (the listing will be added to the slider on the home page. Since version 1.15 objects in the slider are displayed in random order).

The template for displaying the slider is in the file - themes\basis\views\site\_slider_homepage.php Popular directions display widget is in files - themes\basis\helpers\BasisPopularDestWidget.php — code popular_dest_seo.php – template

If you want to show something else instead of the “Popular directions” widget, you can edit the html code in the file themes\basis\views\layouts\index.php

<div class="col-md-5 col-sm-12 col-xs-12">
<?php $this->widget('BasisPopularDestWidget') ?>
</div>

Remove the widget display by replacing the code -

<?php $this->widget('BasisPopularDestWidget') ?>
with your. Also the slider and widget “Popular directions” can be turned off in the Basis Theme settings.

In order to make changes in files, we recommend you to use text editor Notepad++ or any other, which can support correct work with coding "UTF-8 without BOM".

See also:
Settings the Theme “Basis”, Part 1
Customizing Themes "Atlas" and "Basis"