Skip to content

Commit

Permalink
INTERIM-147 Use token for site URL (#152)
Browse files Browse the repository at this point in the history
* INTERIM-147 Use tokens for site URL if available

* INTERIM-147 Token isn't a module

* INTERIM-147 Fix extra slash in urls
  • Loading branch information
njbooher authored and angelamnr committed Dec 28, 2017
1 parent f264bf9 commit 846a379
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion preprocess/preprocess-region.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function suitcase_interim_alpha_preprocess_region(&$vars) {
elseif ($vars['region'] == 'branding') {

// Get the level 1 url
$vars['level_1_url'] = variable_get('suitcase_interim_config_level_1_url');
$vars['level_1_url'] = token_replace(variable_get('suitcase_interim_config_level_1_url'));
$vars['wordmark_alt_text'] = theme_get_setting('suitcase_interim_config_isu_nameplate_alt_text');

$vars['suitcase_interim_config_level_2_url'] = variable_get('suitcase_interim_config_level_2_url');
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p><a href="https://www.iastate.edu" id="isu_footer_wordmark"><img src="<?php print $GLOBALS['base_url'] . '/' . drupal_get_path('theme', 'suitcase_interim') . '/images/isu_stacked.svg'; ?>" alt="Iowa State University" /></a></p>
<p><a href="https://www.iastate.edu" id="isu_footer_wordmark"><img src="<?php print (module_exists('token_filter') ? '[site:url]' : $GLOBALS['base_path']) . drupal_get_path('theme', 'suitcase_interim') . '/images/isu_stacked.svg'; ?>" alt="Iowa State University" /></a></p>
4 changes: 2 additions & 2 deletions templates/default_region_content_blocks/footer_third.tpl.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<ul class="menu">
<li class="first leaf">
<a href="<?php print $GLOBALS['base_url']; ?>/site-index"><i class="fa fa-list-ul" aria-hidden="true"></i>Site Index</a>
<a href="<?php print (module_exists('token_filter') ? '[site:url]' : $GLOBALS['base_path']); ?>site-index"><i class="fa fa-list-ul" aria-hidden="true"></i>Site Index</a>
</li>
<li class="last leaf">
<a href="<?php print $GLOBALS['base_url']; ?>/sitemap" title="Display a site map with RSS feeds."><i class="fa fa-sitemap" aria-hidden="true"></i>Site map</a>
<a href="<?php print (module_exists('token_filter') ? '[site:url]' : $GLOBALS['base_path']); ?>sitemap" title="Display a site map with RSS feeds."><i class="fa fa-sitemap" aria-hidden="true"></i>Site map</a>
</li>
</ul>
2 changes: 1 addition & 1 deletion theme-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function suitcase_interim_form_system_theme_settings_alter(&$form, &$form_state)
'#type' => 'textfield',
'#title' => t('Wordmark URL'),
'#description' => t('Full URL the Iowa State University wordmark should link to. Defaults to site\'s homepage.'),
'#default_value' => variable_get('suitcase_interim_config_level_1_url', $GLOBALS['base_url']),
'#default_value' => variable_get('suitcase_interim_config_level_1_url', '[site:url]'),
'#weight' => 2,
);

Expand Down

0 comments on commit 846a379

Please sign in to comment.