Skip to content

Commit

Permalink
Nept 1422 (#56)
Browse files Browse the repository at this point in the history
* NEPT-1422: Add checkbox to show default or basic header.
* NEPT-1422: Implement ecl structure on page-header.tpl.php
* NEPT-1422: Show title variable on header
* NEPT-1422: Include the meta tag in both headers
* NEPT-1422: Fixed comment not reflecting the actual functionality.
  • Loading branch information
enriquelacoma authored and voidtek committed Feb 28, 2018
1 parent 68d7848 commit 82cda85
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
39 changes: 23 additions & 16 deletions templates/page_header/page-header.tpl.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,31 @@
<div class="ecl-page-header">
<?php print render($breadcrumb); ?>
<div class="ecl-page-header__body">
<?php if (!empty($identity)): ?>
<div class="ecl-container">
<div class="ecl-container">
<?php if (!empty($identity)): ?>
<div class="ecl-page-header__identity">
<?php print render($identity); ?>
</div>
</div>
<?php endif; ?>
<?php if (!empty($meta)): ?>
<div class="ecl-page-header__meta">
<?php print render($meta); ?>
</div>
<?php endif; ?>
<?php if (!empty($introduction)): ?>
<div class="ecl-page-header__intro">
<p class="ecl-paragraph ecl-paragraph--l">
<?php print render($introduction); ?>
</p>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($meta)): ?>
<div class="ecl-page-header__meta">
<?php print render($meta); ?>
</div>
<?php endif; ?>
<?php if(!$ec_europa_basic_header): ?>
<div class="ecl-page-header__title">
<h1 class="ecl-heading ecl-heading--h1 ecl-u-color-white">
<?php print render($title); ?>
</h1>
</div>
<?php if (!empty($introduction)): ?>
<div class="ecl-page-header__intro">
<p class="ecl-paragraph ecl-paragraph--l">
<?php print render($introduction); ?>
</p>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions templates/page_header/page_header.component.inc
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function ec_europa_atomium_definition_page_header() {
* Implements hook_preprocess_hook().
*/
function ec_europa_preprocess_page_header(&$variables, $hook) {
$variables['ec_europa_basic_header'] = theme_get_setting('ec_europa_basic_header', 'ec_europa');
if (module_exists('easy_breadcrumb')) {
// @TODO: The file includes/easy_breadcrumb.blocks.inc
// @TODO: only exists in easy_breadcrumb <= 7.x-2.12
Expand Down
7 changes: 7 additions & 0 deletions theme-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ function ec_europa_form_system_theme_settings_alter(&$form, &$form_state) {
],
],
];

$form['ec_europa']['ec_europa_basic_header'] = [
'#type' => 'checkbox',
'#title' => t('Use basic header?'),
'#description' => t('If this option is selected, the title and introduction sections will be removed from the header.'),
'#default_value' => theme_get_setting('ec_europa_basic_header', 'ec_europa'),
];
}

0 comments on commit 82cda85

Please sign in to comment.