meta data for this page
Differences
This shows you the differences between two versions of the page.
show_blesta_navigation_on_certain_pages [2022/12/10 15:34] – created sgraf | show_blesta_navigation_on_certain_pages [2022/12/10 16:14] (current) – sgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | ====== Show the Blesta navigation on certain pages ====== |
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | So you would like to show the Blesta navigation so you don't need to incorporate it into your custom BlestaCMS Pro navigation, which is used for your template, we've all been there. | ||
+ | |||
+ | We use the following code and plenty of our Alpha testers have found it to work very well. This code only shows the Blesta navigation on the following pages: | ||
+ | |||
+ | - `https:// | ||
+ | - `https:// | ||
+ | - `https:// | ||
+ | - `https:// | ||
+ | - `https:// | ||
+ | |||
+ | The only page you may need to edit is the `portal` link to your " | ||
+ | |||
+ | <?php if (strpos($_SERVER[' | ||
+ | <div class=" | ||
+ | <nav class=" | ||
+ | <button class=" | ||
+ | <span class=" | ||
+ | </ | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | <?php | ||
+ | $active_nav = null; | ||
+ | ?> | ||
+ | <ul class=" | ||
+ | <?php | ||
+ | foreach ($this-> | ||
+ | $attributes = [' | ||
+ | $link_attributes = [' | ||
+ | $dropdown = !empty($value[' | ||
+ | $active = false; | ||
+ | |||
+ | if ($value[' | ||
+ | $active = true; | ||
+ | $attributes[' | ||
+ | $active_nav = $value; | ||
+ | } | ||
+ | if ($dropdown) { | ||
+ | $attributes[' | ||
+ | $link_attributes[' | ||
+ | $link_attributes[' | ||
+ | |||
+ | // Set parent to active if child is | ||
+ | if (!$active) { | ||
+ | foreach ($this-> | ||
+ | if ($sub_value[' | ||
+ | $attributes[' | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ?> | ||
+ | < | ||
+ | <a href="<? | ||
+ | <i class="<? | ||
+ | <?php | ||
+ | $this-> | ||
+ | ?> | ||
+ | </ | ||
+ | <?php | ||
+ | if (!empty($value[' | ||
+ | ?> | ||
+ | <div class=" | ||
+ | <?php | ||
+ | foreach ($this-> | ||
+ | ?> | ||
+ | <a class=" | ||
+ | <?php | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | <?php | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | <?php | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | <ul class=" | ||
+ | <?php | ||
+ | if ($this-> | ||
+ | ?> | ||
+ | <li class=" | ||
+ | <a href="#" | ||
+ | <?php $this-> | ||
+ | <b class=" | ||
+ | </ | ||
+ | <div class=" | ||
+ | <a class=" | ||
+ | <div class=" | ||
+ | <a class=" | ||
+ | <div class=" | ||
+ | <a class=" | ||
+ | </ | ||
+ | </ | ||
+ | <?php | ||
+ | } else { | ||
+ | ?> | ||
+ | <li class=" | ||
+ | <a class=" | ||
+ | <?php $this-> | ||
+ | </ | ||
+ | </ | ||
+ | <?php | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | <?php | ||
+ | } | ||
+ | ?> | ||
+ | |||
+ | |||
+ | |||
+ | </ |