Jump to content
  • 0

How To Add Some Elements On Here?


Question

5 answers to this question

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

@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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...