title();
//Include the parent page if chosen
if( $asm->include_parent() ){
$content .= '
';
$content .= $asm->openListItem( wp_list_categories( 'echo=0&title_li=&include=' . $top_cat) );
}
//If there are children to display
if( !empty($all_categories) ){
$content .= '
';
#-- If they want all the child categories displayed always
if( $asm->display_all() ){
$content .= wp_list_categories('echo=0&title_li=&child_of=' . $top_cat .'&depth=' .$instance['levels'] );
} else {
#-- to Display the categories based a parent child relationship
foreach( $all_categories as $child_cat ){
//IF this is a child category of the top one
if( $asm->first_level_category( $child_cat ) ){
//List the child category and the children if it is the current one
$content .= $asm->openListItem(wp_list_categories('echo=0&title_li=&include=' . $child_cat->cat_ID . '&depth=1' ) );
//If there are children of this cat and it is a parent or child or the current cat
if( $asm->second_level_cat( $child_cat ) ){
#-- Create a new menu with all the children under it
$content .= '