ariq01 Posted February 12, 2015 Report Posted February 12, 2015 Helloo blestars. i wanna ask. How to add some elements on here? i want to add Order (link). Thanks btw Quote
0 Michael Posted February 12, 2015 Report Posted February 12, 2015 You can do either: 1. Edit Structure.pdt and add stuff after this: <?php foreach ($this->Html->ifSet($nav, array()) as $link => $value) { $attributes = array(); $link_attributes = array(); $dropdown = !empty($value['sub']); $active = false; if ($value['active']) { $active = true; $attributes['class'][] = "active"; $active_nav = $value; } if ($dropdown) { $attributes['class'][] = "dropdown"; $link_attributes['class'][] = "dropdown-toggle"; $link_attributes['data-toggle'][] = "dropdown"; // Set parent to active if child is if (!$active) { foreach ($this->Html->ifSet($value['sub'], array()) as $sub_link => $sub_value) { if ($sub_value['active']) { $attributes['class'][] = "active"; break; } } } } ?> <li<?php echo $this->Html->buildAttributes($attributes);?>> <a href="<?php $this->Html->_($link);?>"<?php echo $this->Html->buildAttributes($link_attributes);?>> <i class="<?php $this->Html->_($value['icon']);?>"></i> <?php $this->Html->_($value['name']); if ($dropdown) { ?> <b class="caret"></b> <?php } ?> </a> <?php if (!empty($value['sub'])) { ?> <ul class="dropdown-menu"> <?php foreach ($this->Html->ifSet($value['sub'], array()) as $sub_link => $sub_value) { ?> <li> <a href="<?php $this->Html->_($sub_link);?>"><i class="<?php $this->Html->_($sub_value['icon']);?>"></i> <?php $this->Html->_($sub_value['name']);?></a> </li> <?php } ?> </ul> <?php } ?> </li> <?php } ?> 2. Or you can use the Admin Tools plugin from Naja7host. ariq01 1 Quote
0 Tyson Posted February 12, 2015 Report Posted February 12, 2015 You can write a plugin that adds elements to the main navigation using the nav_primary_staff plugin action. Michael and ariq01 2 Quote
0 Blesta Addons Posted February 12, 2015 Report Posted February 12, 2015 You can write a plugin that adds elements to the main navigation using the nav_primary_staff plugin action. @Tyson , i think this is another reason to unlock the primary key for navigation . to add just 3 navigation link , you need to write 3 plugins , is this logical for you ? Quote
0 Tyson Posted February 13, 2015 Report Posted February 13, 2015 @Tyson , i think this is another reason to unlock the primary key for navigation . to add just 3 navigation link , you need to write 3 plugins , is this logical for you ? My response to that is in your feature request thread. I'm deferring to Cody for an update to plugin actions. Quote
0 Blesta Addons Posted February 13, 2015 Report Posted February 13, 2015 My response to that is in your feature request thread. I'm deferring to Cody for an update to plugin actions. so your job now is catch @Cody and bring him to this forum , take note, we need it alive Quote
Question
ariq01
Helloo blestars.
i wanna ask.
How to add some elements on here?
i want to add Order (link).
Thanks btw
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.