| 
									
										
										
										
											2020-11-25 09:07:06 +08:00
										 |  |  | <!-- lv1 --> | 
					
						
							|  |  |  | <ul class="layui-nav layui-nav-tree layui-parents-nav"> | 
					
						
							|  |  |  |     {foreach $rules as $rule} | 
					
						
							|  |  |  |         {php} | 
					
						
							|  |  |  |         if(!strpos($rule['name'],'/')){ | 
					
						
							|  |  |  |             $ruleName = $rule['name'].'/index'; | 
					
						
							|  |  |  |             $controller = strtolower($rule['name']); | 
					
						
							|  |  |  |         }else{ | 
					
						
							|  |  |  |             $ruleName = $rule['name']; | 
					
						
							|  |  |  |             $controller = substr($rule['name'],0,strpos($rule['name'],'/')); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         $controller = str_replace('manager.', '', $controller); | 
					
						
							|  |  |  |         {/php} | 
					
						
							|  |  |  |         {if $controller == 'content'} | 
					
						
							|  |  |  |             {if !empty($menus)} | 
					
						
							|  |  |  |             <li class="layui-nav-item layui-lv1 {if $controller == $current}layui-this{/if}"> | 
					
						
							|  |  |  |                 <a href="javascript:;" title="{$rule.title}" class="one"> | 
					
						
							|  |  |  |                     <cite>{$rule['title']}</cite> | 
					
						
							|  |  |  |                 </a> | 
					
						
							|  |  |  |                 <!-- lv2 --> | 
					
						
							|  |  |  |                 <ul class="layui-nav-child"> | 
					
						
							|  |  |  |                     {foreach $menus as $menu} | 
					
						
							|  |  |  |                     {if isset($menu['children']) && count($menu['children'])} | 
					
						
							|  |  |  |                     <li class="layui-nav-item layui-lv2 {if $categoryId == $menu['id']}layui-this{/if}"> | 
					
						
							| 
									
										
										
										
											2020-12-04 16:09:05 +08:00
										 |  |  |                         <a href="javascript:;" class="one {if $categoryId == $menu['id']}active{/if}"> | 
					
						
							| 
									
										
										
										
											2020-11-25 09:07:06 +08:00
										 |  |  |                             <cite>{$menu.title}</cite> | 
					
						
							|  |  |  |                         </a> | 
					
						
							|  |  |  |                         <!-- lv3 --> | 
					
						
							|  |  |  |                         <ul class="layui-nav-child"> | 
					
						
							|  |  |  |                             {foreach $menu['children'] as $child} | 
					
						
							|  |  |  |                             {if isset($child['children']) && count($child['children'])} | 
					
						
							|  |  |  |                             <li class="layui-nav-item layui-lv3 {if $categoryId == $child['id']}layui-this{/if}"> | 
					
						
							| 
									
										
										
										
											2020-12-04 16:09:05 +08:00
										 |  |  |                                 <a href="javascript:;" class="one {if $categoryId == $child['id']}active{/if}"> | 
					
						
							| 
									
										
										
										
											2020-11-25 09:07:06 +08:00
										 |  |  |                                     <cite>{$child.title}</cite> | 
					
						
							|  |  |  |                                 </a> | 
					
						
							|  |  |  |                                 <!-- lv4 --> | 
					
						
							|  |  |  |                                 <ul class="layui-nav-child"> | 
					
						
							|  |  |  |                                     {foreach $child['children'] as $chil} | 
					
						
							|  |  |  |                                     <li class="layui-nav-item layui-lv4 {if $categoryId == $chil['id']}layui-this{/if}"> | 
					
						
							|  |  |  |                                         <a href="{:url('manager.content/'.$chil['manager'],['category_id' => $chil['id']])}" class="two"> | 
					
						
							|  |  |  |                                             <cite>{$chil.title}</cite> | 
					
						
							|  |  |  |                                         </a> | 
					
						
							|  |  |  |                                     </li> | 
					
						
							|  |  |  |                                     {/foreach} | 
					
						
							|  |  |  |                                 </ul> | 
					
						
							|  |  |  |                             </li> | 
					
						
							|  |  |  |                             {else /} | 
					
						
							|  |  |  |                             <li class="layui-nav-item layui-lv3 {if $categoryId == $child['id']}layui-this{/if}"> | 
					
						
							|  |  |  |                                 <a href="{:url('manager.content/'.$child['manager'],['category_id' => $child['id']])}" class="two"> | 
					
						
							|  |  |  |                                     <cite>{$child.title}</cite> | 
					
						
							|  |  |  |                                 </a> | 
					
						
							|  |  |  |                             </li> | 
					
						
							|  |  |  |                             {/if} | 
					
						
							|  |  |  |                             {/foreach} | 
					
						
							|  |  |  |                         </ul> | 
					
						
							|  |  |  |                     </li> | 
					
						
							|  |  |  |                     {else /} | 
					
						
							|  |  |  |                     <li class="layui-nav-item layui-lv2 {if $categoryId == $menu['id']}layui-this{/if}"> | 
					
						
							|  |  |  |                         <a href="{:url('manager.content/'.$menu['manager'],['category_id' => $menu['id']])}" class="two"> | 
					
						
							|  |  |  |                             <cite>{$menu.title}</cite> | 
					
						
							|  |  |  |                         </a> | 
					
						
							|  |  |  |                     </li> | 
					
						
							|  |  |  |                     {/if} | 
					
						
							|  |  |  |                     {/foreach} | 
					
						
							|  |  |  |                 </ul> | 
					
						
							|  |  |  |             </li> | 
					
						
							|  |  |  |             {/if} | 
					
						
							|  |  |  |         {elseif $rule['parent_id'] == 0 /} | 
					
						
							|  |  |  |             <li class="layui-nav-item layui-lv1 {if $controller == $current}layui-this{/if}"> | 
					
						
							|  |  |  |                 {if isset($rule['children']) && count($rule['children'])} | 
					
						
							|  |  |  |                 <a href="javascript:;" title="{$rule.title}" class="one"> | 
					
						
							|  |  |  |                     <cite>{$rule['title']}</cite> | 
					
						
							|  |  |  |                 </a> | 
					
						
							|  |  |  |                 <!-- lv2 --> | 
					
						
							|  |  |  |                 <ul class="layui-nav-child"> | 
					
						
							|  |  |  |                     {foreach $rule['children'] as $child} | 
					
						
							|  |  |  |                     {php} | 
					
						
							|  |  |  |                     if(!strpos($child['name'],'/')){ | 
					
						
							|  |  |  |                         $childRuleName = $child['name'].'/index'; | 
					
						
							|  |  |  |                     }else{ | 
					
						
							|  |  |  |                         $childRuleName = $child['name']; | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                     {/php} | 
					
						
							|  |  |  |                     <li class="layui-nav-item layui-lv2 {if $currentAction == strtolower($childRuleName)}layui-this{/if}"> | 
					
						
							|  |  |  |                         <a href="{:url('manager.'.$childRuleName)}" class="two"> | 
					
						
							|  |  |  |                             <cite>{$child.title}</cite> | 
					
						
							|  |  |  |                         </a> | 
					
						
							|  |  |  |                     </li> | 
					
						
							|  |  |  |                     {/foreach} | 
					
						
							|  |  |  |                 </ul> | 
					
						
							|  |  |  |                 {else /} | 
					
						
							|  |  |  |                 <a href="{:url('manager.'.$ruleName)}" class="two"> | 
					
						
							|  |  |  |                     <cite>{$rule.title}</cite> | 
					
						
							|  |  |  |                 </a> | 
					
						
							|  |  |  |                 {/if} | 
					
						
							|  |  |  |             </li> | 
					
						
							|  |  |  |         {/if} | 
					
						
							|  |  |  |     {/foreach} | 
					
						
							|  |  |  | </ul> |