removement
10/17/2019 - 3:32 PM

Compairing URL Segment

Compairing URL segment to show different content depending on segment.

<?php $uriSegments = explode("/", parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); ?>

<?php if ($uriSegments[1] == "en") { ?>
  <?php $this->inc('elements/main-nav-english.php'); ?>
<?php } elseif ($uriSegments[1] == "de") { ?>
  <?php $this->inc('elements/main-nav-german.php'); ?>
<?php } elseif ($uriSegments[1] == "ru") { ?>
  <?php $this->inc('elements/main-nav-russian.php'); ?>
<?php } ?>