576
правок
Изменения
→Краткий пример по разворачиванию ЦМС
{cms_render_block id=1} идентификатор блока нужно посмотреть в разделе "Управление сайтом - Nemo CMS - Блоки элементов", в примере выше 1 - шапка, 2 - контент, 3 - подвал.
'''4)''' В разделе "Управление сайтом - Nemo CMS - Шаблоны" создаем шаблон шапки.
https://drive.google.com/file/d/0B2geuk8VO4nOUkZ5NDZwelVDaUk/view?usp=sharing
<div class="toccolours mw-collapsible mw-collapsed" style="margin-bottom:10px;">
==== module.textsystem.single.header.tpl ====
<div class="mw-collapsible-content">
<pre>
{foreach from=$global item=item key=key}{assign var=$key value=$item}{/foreach}
{* Loading registration forms *}
{registrationForms}
{getCurrencyConverterData}
<div class="nemo-common-mobileControl nemo-common-mobileControl_links js-nemo-mobileControl js-nemo-mobileControl_links">
<div class="nemo-common-mobileControl__pseudoHeader">
<div class="nemo-common-mobileControl__pseudoHeader__close js-nemo-mobileControl__close"></div>
<div class="nemo-common-mobileControl__pseudoHeader__options js-nemo-mobileControl__toOptions"></div>
<div class="nemo-common-mobileControl__pseudoHeader__title js-nemo-mobileControl__title"></div>
</div>
<div class="nemo-ui-subContainer nemo-common-mobileControl__sideblock">
<div class="nemo-common-mobileControl__sideblock__user">
{if $info_user_status == 'gst'}
{if $mode_auth_form}
<button class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__sideblock__user__button js-header-auth_adaptive">
{'new-header-enter'|language}
</button>
{else}
<a href="{go_and_back controller='authorization' action='auth_client'}" class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__sideblock__user__button">
{'new-header-enter'|language}
</a>
{/if}
{if isset($registrationFormsData.b2c)}
<a href="/{url controller='authorization' action='registration' get=''}" class="{if $registrationFormsData.b2c->popup}nemo-ui-pseudoLink js-header-register_adaptive {/if}nemo-common-pageHeader__inner__headerLinks__item">
{'new-header-registration'|language}
</a>
{/if}
{else}
<div class="nemo-common-mobileControl__sideblock__user__name">
{$info_name} {$info_surname} {$info_login}
{if $info_user_status !== 'usr'}
({$info_user_status|language})
{/if}
</div>
{strip}
{if !$hide_poffice}
<a class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__sideblock__user__button" href="/{url controller="poffice" action="table"}">{'new-header-privateOffice'|language}</a>
{/if}
<a class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__sideblock__user__button" href="/{url controller="settings" action="dashboard"}" target="_blank">{'new-header-settings'|language}</a>
<a class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__sideblock__user__button" href="/{go_and_back controller='authorization' action='logout'}">{'new-header-logout'|language}</a>
{/strip}
{/if}
{if $show_booking_status_check}
<a href="/{url controller='booking' action='status'}" class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__sideblock__user__button js-header-checkOrder_adaptive">
{'new-header-checkBookStatus'|language}
</a>
{/if}
</div>
{if in_array('FLIGHTS', $enabled_components)}
{if $current_component != 'FLIGHTS'}
<a class="nemo-common-mobileControl__sideblock__componentLink" href="/avia">
{'header.components_menu--flights'|language}
</a>
{else}
<span class="nemo-common-mobileControl__sideblock__componentLink nemo-common-mobileControl__sideblock__componentLink_active">{'header.components_menu--flights'|language}</span>
{/if}
{/if}
{if in_array('HOTELS', $enabled_components)}
{if $current_component != 'HOTELS'}
<a class="nemo-common-mobileControl__sideblock__componentLink" href="/hotels">
{'header.components_menu--hotels'|language}
</a>
{else}
<span class="nemo-common-mobileControl__sideblock__componentLink nemo-common-mobileControl__sideblock__componentLink_active">{'header.components_menu--hotels'|language}</span>
{/if}
{/if}
{if in_array('TRAINS', $enabled_components)}
{if $current_component != 'TRAINS'}
<a class="nemo-common-mobileControl__sideblock__componentLink" href="/trains">
{'header.components_menu--trains'|language}
</a>
{else}
<span class="nemo-common-mobileControl__sideblock__componentLink nemo-common-mobileControl__sideblock__componentLink_active">{'header.components_menu--trains'|language}</span>
{/if}
{/if}
</div>
</div>
<div class="nemo-common-mobileControl nemo-common-mobileControl_options js-nemo-mobileControl js-nemo-mobileControl_options">
<div class="nemo-common-mobileControl__optionsInner">
<div class="nemo-common-mobileControl__optionsBlock js-nemo-mobileControl__optionsBlock js-nemo-mobileControl__optionsBlock_selector">
{assign var=locale_up value=$locale|upper}
<div class="nemo-ui-subContainer nemo-common-mobileControl__optionsBlock__options">
<div class="nemo-common-mobileControl__optionsBlock__option" data-block="userInfo">
<span class="nemo-common-mobileControl__optionsBlock__option__value">
{strip}
<a href="/profile">
{if $info_name}
{$info_name}
{elseif $info_surname}
{$info_surname}
{else}
{$info_login}
{/if}
</a>
{/strip}
{if $info_user_status !== 'usr'}
({$info_user_status|language})
{/if}
</span>
</div>
<div class="nemo-common-mobileControl__optionsBlock__option js-nemo-mobileControl__optionsBlock__selector" data-block="language">
<span class="nemo-common-mobileControl__optionsBlock__option__additional">{'new-header-mobileOptions__change'|language}</span>
<span class="nemo-common-mobileControl__optionsBlock__option__value">
{'lang_'|cat:$locale_up|language}
</span>
</div>
<div class="nemo-common-mobileControl__optionsBlock__option js-nemo-mobileControl__optionsBlock__selector" data-block="currency">
<span class="nemo-common-mobileControl__optionsBlock__option__additional">{'new-header-mobileOptions__change'|language}</span>
<span class="nemo-common-mobileControl__optionsBlock__option__value js-nemo-mobileControl__currency__selected">{'currency_'|cat:$currencyConverter.defaultCurrency|language}</span>
</div>
</div>
<div class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__optionsBlock__cancel js-nemo-mobileControl__close">{'new-header-mobileOptions__close'|language}</div>
</div>
<div class="nemo-common-mobileControl__optionsBlock js-nemo-mobileControl__optionsBlock js-nemo-mobileControl__optionsBlock_language" style="display: none;">
<div class="nemo-ui-subContainer nemo-common-mobileControl__optionsBlock__options">
{foreach item=lang from=$agency_langs key=lang_code}
{if $locale != $lang_code}
<div class="nemo-common-mobileControl__optionsBlock__option js-nemo-header-dropmenu__drop__language" data-language="{$lang_code}">
{$lang}
</div>
{/if}
{/foreach}
</div>
<div class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__optionsBlock__cancel js-nemo-mobileControl__optionsBlock__selector" data-block="selector">{'new-header-mobileOptions__cancel'|language}</div>
</div>
<div class="nemo-common-mobileControl__optionsBlock js-nemo-mobileControl__optionsBlock js-nemo-mobileControl__optionsBlock_currency" style="display: none;">
<div class="nemo-ui-subContainer nemo-common-mobileControl__optionsBlock__options">
{foreach from=$currencyConverter.rates item=oneCur key=key}
<div class="nemo-common-mobileControl__optionsBlock__option js-nemo-mobileControl__currency__option" data-currency="{$key}">
{'currency_'|cat:$key|language}
</div>
{/foreach}
</div>
<div class="nemo-ui-button nemo-ui-button_common nemo-common-mobileControl__optionsBlock__cancel js-nemo-mobileControl__optionsBlock__selector" data-block="selector">{'new-header-mobileOptions__cancel'|language}</div>
</div>
</div>
</div>
<header class="nemo-common-pageHeader">
<div class="nemo-common-pageHeader__inner">
<div class="nemo-common-pageHeader__mobileControl nemo-common-pageHeader__mobileControl_links js-nemo-mobileControl__toggler" data-control="links"></div>
<div class="nemo-common-pageHeader__mobileControl nemo-common-pageHeader__mobileControl_options js-nemo-mobileControl__toggler" data-control="options"></div>
<a href="/" class="nemo-common-pageHeader__logo">
<img class="nemo-common-pageHeader__logo__image" src="/templates/wurst/f2.0/img/nemo.travel.svg" alt="">
</a>
<div class="nemo-common-pageHeader__inner__headerLinks">
{if $test_mode}
{'system_test_mode'|language}
{/if}
{if $info_user_status == 'gst'}
{if $mode_auth_form}
<button class="nemo-ui-button nemo-ui-button_common nemo-ui-button_medium nemo-common-pageHeader__inner__headerLinks__item js-header-auth">
{'new-header-enter'|language}
</button>
{else}
<a href="{go_and_back controller='authorization' action='auth_client'}" class="nemo-ui-button nemo-ui-button_common nemo-ui-button_medium nemo-common-pageHeader__inner__headerLinks__item">
{'new-header-enter'|language}
</a>
{/if}
<div class="js-header-restorepass" style="display: none;"></div>
{include file='authorization_popup.tpl'}
{include file='authorization_passRecovery_popup.tpl'}
{if isset($registrationFormsData.b2c)}
<a href="/{url controller='authorization' action='registration' get=''}" class="{if $registrationFormsData.b2c->popup}nemo-ui-pseudoLink js-header-register {else}js-header-register-link {/if}nemo-common-pageHeader__inner__headerLinks__item">
{'new-header-registration'|language}
</a>
{if $registrationFormsData.b2c->popup}
<div class="js-registration-formcontainer_b2c" style="display: none;">
{include file="registration_inline.tpl" form=$registrationFormsData.b2c}
</div>
{/if}
{/if}
{else}
<span class="nemo-common-pageHeader__inner__headerLinks__item">
{'new-header-welcome'|language}
{strip}
<a href="/profile">
{$info_logged_in_as}
</a>
{/strip}
{if $info_user_status !== 'usr'}
({$info_user_status|language})
{/if}
</span>
<a class="nemo-common-pageHeader__inner__headerLinks__item" href="/{go_and_back controller='authorization' action='logout'}">{'new-header-logout'|language}</a>
<a class="nemo-common-pageHeader__inner__headerLinks__item" href="/{url controller="settings" action="dashboard"}" target="_blank">{'new-header-settings'|language}</a>
{if !$hide_poffice}
<a class="nemo-common-pageHeader__inner__headerLinks__item" href="/{url controller="poffice" action="table"}">{'new-header-privateOffice'|language}</a>
{/if}
{/if}
{if $show_booking_status_check}
<a href="/{url controller='booking' action='status'}" class="nemo-ui-pseudoLink nemo-common-pageHeader__inner__headerLinks__item js-header-checkOrder">
{'new-header-checkBookStatus'|language}
</a>
{include file='checkBooking_popup.tpl'}
{/if}
</div>
<div class="nemo-common-pageHeader__inner__headerRight">
<div class="nemo-ui-dropMenu js-nemo-header-dropmenu nemo-common-pageHeader__dropMenu nemo-common-pageHeader__dropMenu_language">
<div class="nemo-ui-dropMenu__main">
<button class="nemo-ui-button nemo-ui-button_common nemo-common-pageHeader__dropMenu__button js-nemo-header-dropmenu__button">
<span class="nemo-common-pageHeader__langSelectImage flag flag-{if $locale neq 'en'}{$locale|upper}{else}GB{/if}"></span>
</button>
</div>
<div class="nemo-ui-dropMenu__drop js-nemo-header-dropmenu__drop nemo-common-pageHeader__droplist nemo-common-pageHeader__droplist_language">
<span class="nemo-common-pageHeader__droplist__header">Язык</span>
{foreach item=lang from=$agency_langs key=lang_code}
{if $locale != $lang_code}
<div class="nemo-common-pageHeader__droplist__option js-nemo-header-dropmenu__drop__option js-nemo-header-dropmenu__drop__language" data-language="{$lang_code}">
<div class="nemo-common-pageHeader__droplist__option__icon">
<span class="nemo-common-pageHeader__langSelectImage flag flag-{if $lang_code neq 'en'}{$lang_code|upper}{else}GB{/if}"></span>
</div>
<span class="nemo-common-pageHeader__droplist__option__text">
{$lang}
</span>
</div>
{/if}
{/foreach}
</div>
</div>
{if count($currencyConverter.rates) > 1 && $currencyConverter.conversionEnabled}
<div class="nemo-ui-dropMenu js-nemo-header-dropmenu nemo-common-pageHeader__dropMenu nemo-common-pageHeader__dropMenu_currency">
<div class="nemo-ui-dropMenu__main">
<button class="nemo-ui-button nemo-ui-button_common nemo-common-pageHeader__dropMenu__button js-nemo-header-dropmenu__button">
{if $currencyConverter.defaultCurrency == "RUB"}
<money><currency type="symbol" currency="RUB">RUB</currency></money>
{else}
{"currency_"|cat:$currencyConverter.defaultCurrency|cat:"_symbol"|language}
{/if}
</button>
</div>
<div class="nemo-ui-dropMenu__drop js-nemo-header-dropmenu__drop nemo-common-pageHeader__droplist">
<span class="nemo-common-pageHeader__droplist__header">Валюта поиска и оплаты</span>
{foreach from=$currencyConverter.rates item=oneCur key=key}
<div class="nemo-common-pageHeader__droplist__option js-nemo-header-dropmenu__drop__option js-nemo-header-dropmenu__drop__currency" data-currency="{$key}">
<div class="nemo-common-pageHeader__droplist__option__icon">
{if $key == "RUB"}
<money><currency type="symbol" currency="RUB">RUB</currency></money>
{else}
{"currency_$key"|cat:"_symbol"|language}
{/if}
</div>
<span class="nemo-common-pageHeader__droplist__option__text">
{"currency_$key"|language}
</span>
<span class="js-nemo-header-dropmenu__drop__currency__text" style="display: none;">
{if $key == "RUB"}
<money><currency type="symbol" currency="RUB">RUB</currency></money>
{else}
{"currency_$key"|cat:"_symbol"|language}
{/if}
</span>
</div>
{/foreach}
</div>
</div>
{/if}
</div>
</div>
{include file="authenticationWarning.tpl"}
{include file="header_scripts.tpl"}
</header>
</pre>
</div>
</div>
== См. также ==