mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 11:19:56 +09:00
#18959053 : added menu mobile view
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7539 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
39210c6a8b
commit
b2795fbaa4
3 changed files with 66 additions and 0 deletions
37
modules/menu/menu.mobile.php
Normal file
37
modules/menu/menu.mobile.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
class menuMobile extends moduleObject {
|
||||
var $result = array();
|
||||
|
||||
function straightenMenu($menu_item, $depth)
|
||||
{
|
||||
$obj->href = $menu_item['href'];
|
||||
$obj->depth = $depth;
|
||||
$obj->link = $menu_item['link'];
|
||||
$this->result[] = $obj;
|
||||
if(!$menu_item['list']) return;
|
||||
foreach($menu_item['list'] as $item)
|
||||
{
|
||||
$this->straightenMenu($item, $depth+1);
|
||||
}
|
||||
}
|
||||
|
||||
function dispMenuMenu() {
|
||||
$menu_srl = Context::get('menu_srl');
|
||||
$oAdminModel =& getAdminModel('menu');
|
||||
$menu_info = $oAdminModel->getMenu($menu_srl);
|
||||
if(file_exists($menu_info->php_file)) @include($menu_info->php_file);
|
||||
|
||||
foreach($menu->list as $menu_item)
|
||||
{
|
||||
$this->straightenMenu($menu_item, 0);
|
||||
}
|
||||
|
||||
Context::set('menu', $this->result);
|
||||
|
||||
$this->setTemplatePath(sprintf("%stpl/",$this->module_path));
|
||||
$this->setTemplateFile('menu.html');
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue