Skip to content

Instantly share code, notes, and snippets.

@Eugeny
Created March 18, 2011 17:27
Show Gist options
  • Save Eugeny/876485 to your computer and use it in GitHub Desktop.
Save Eugeny/876485 to your computer and use it in GitHub Desktop.
<?
$menus = array(
"MAIN" => array(
array(
"icon" => "",
"text" => "",
"url" => "/"
),
array(
"icon" => "",
"text" => "",
"url" => ""
)
),
"MISC" => array(
array(
"icon" => "",
"text" => "",
"url" => ""
),
array(
"icon" => "",
"text" => "",
"url" => ""
)
)
);
$icon_url = "/wordpress/wp-content/themes/feature-list/menuicons";
$base_url = "/wordpress";
foreach ($menus as $text => $cat) {
?>
<div class="ui-el-categoryfolder">
<? echo $text ?>
<div class="ui-el-categoryfolder-children">
<?
foreach ($data as $item) {
?>
<a href="<? echo $base_url . $item['url'] ?>">
<div class="ui-el-category">
<img src="<? echo $icon_url . $item['icon'] . '.png' ?>" class="ui-el-category-icon" />
<span class="ui-el-category-text">
<? echo $item['text'] ?>
</span>
</div>
</a>
<?
}
?>
</div>
</div>
<?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment