codit_build_menu_list() - Generate a column list from a menu
This function appears in the Codit Module
If you need to make a multicolumn list from a menu (or even a vocabulary) this function allows you to do that
Features
- Flexible column numbers - will evenly distribute menu items across as many columns as requested.
- Flexible reading directions - can toggle it to be read down, or across.
- Flexible list structure using div, ul-li, or span.
- Appropriately classed with column and item counts as well as first, middle , last. it uses codit_columnize() and codit_first_last_class().
- Cached separately to make repeated calls for the same menu output less resource intensive. To see changes you MUST flush cache.
- Can be tied to a taxonomy, you just have to connect the vocabulary to a menu first.
<?php
/**
* Builds the html for menu links in appropriate columns.
*
* @param string $s_menu_to_load
* The machine name for a menu to load.
* @param int $i_total_columns
* The total number of columns to create.
* @param string $s_direction
* The direction that the columns should read (down [default], across)
* @param string $s_wrapped
* What the items should be wrapped in (list [default], div)
*
* @return string
* Html of the entire list appropriately wrapped and classed.
* The return value is heavy cached.
*/
function codit_build_menu_list($s_menu_to_load, $i_total_columns, $s_direction = 'down', $s_wrapped = 'list') {
//magical stuff
}
?>