Skip to content

Commit 22efa03

Browse files
committed
update splash page template
1 parent 8083459 commit 22efa03

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,21 @@ NRCan's Drupal WxT Profile
22
=======================
33

44
This composer.json and related files is based on the drupalwxt project template and includes a sub-theme and some custom modules.
5+
6+
7+
8+
9+
10+
11+
# To Setup the Splash Page
12+
- Enable the Language Selection Module
13+
- Ensure Theme Settings Module is enabled
14+
- Go to Theme Settings Config
15+
- Set Splash values (bg, link text, site name)
16+
- https://test.osdp.azure.nrcan-rncan.cloud/en/admin/config/regional/language/detection
17+
- Go to Language Detection & Selection
18+
- https://test.osdp.azure.nrcan-rncan.cloud/en/admin/config/regional/language/detection
19+
- Enable "Language Selection Page" and move to bottom
20+
- Go to Config for Language Selection
21+
- Set Page title
22+
- Set path to /splash

html/themes/custom/nrcan_wxt/nrcan_wxt.theme

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ function nrcan_wxt_theme_suggestions_block_alter(&$suggestions, $variables) {
2424
function nrcan_wxt_preprocess_language_selection_page_content(&$variables) {
2525
$splash_config = \Drupal::config('theme_settings.splash');
2626

27-
$variables['site_name_en'] = $splash_config->get('site_name_en');
28-
$variables['site_name_fr'] = $splash_config->get('site_name_fr');
27+
$variables['site_name_en'] = $splash_config->get('site_name.en');
28+
$variables['site_name_fr'] = $splash_config->get('site_name.fr');
29+
$variables['tc_link_en'] = $splash_config->get('tc_link.en');
30+
$variables['tc_link_fr'] = $splash_config->get('tc_link.fr');
2931
}

html/themes/custom/nrcan_wxt/src/Plugin/Preprocess/Page.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ public function preprocess(array &$variables, $hook, array $info) {
5858

5959
$splash_config = \Drupal::config('theme_settings.splash');
6060
$variables['splash_bg'] = $splash_config->get('splash_bg');
61-
$variables['site_name_en'] = $splash_config->get('site_name_en');
62-
$variables['site_name_fr'] = $splash_config->get('site_name_fr');
61+
$variables['site_name_en'] = $splash_config->get('site_name.en');
62+
$variables['site_name_fr'] = $splash_config->get('site_name.fr');
63+
$variables['tc_link_en'] = $splash_config->get('tc_link.en');
64+
$variables['tc_link_fr'] = $splash_config->get('tc_link.fr');
6365

6466
//kint($variables);
6567

html/themes/custom/nrcan_wxt/templates/splash/language-selection-page-content.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<div class="sp-bx-bt col-xs-12">
5454
<div class="row">
5555
<div class="col-xs-7 col-md-8">
56-
<a href="https://www.canada.ca/en/transparency/terms.html" class="sp-lk">Terms and conditions</a> <span class="glyphicon glyphicon-asterisk"></span> <a href="https://www.canada.ca/fr/transparence/avis.html" class="sp-lk" lang="fr">Avis</a>
56+
<a href="{{ tc_link_en }}" class="sp-lk">Terms and conditions</a> <span class="glyphicon glyphicon-asterisk"></span> <a href="{{ tc_link_fr }}" class="sp-lk" lang="fr">Avis</a>
5757
</div>
5858
<div class="col-xs-5 col-md-4 text-right mrgn-bttm-md">
5959
<img src="./libraries/theme-gcweb/assets/wmms-spl.svg" width="127" alt="Symbol of the Government of Canada"><span class="wb-inv"> / <span lang="fr">Symbole du gouvernement du Canada</span></span>

0 commit comments

Comments
 (0)