I have two lists in a dialog – one bubble count list and one thumbs list. The bubble count list looks fine, but the thumbs list is displayed as separate list items.

I’m not used to writing the html output this way, maybe I’m missing something simple. The code for the bubble count list is below “//assign movie folder to child” and the code for the thumbs list is below “//display image count, encode url path”:
private function _makeoutput($folder_index) {
$html = '';
$query = 'dir§'.$this->session->userdata('uid').'§'.$folder_index;
//api query, create listview for images
if($xml = $this->api->query($query)){
$xml = simplexml_load_string($xml);
$html .= '<ul data-role="listview" data-inset="true" text-align:center;>';
//assign movie folders to child
foreach($xml->COM->MOVIE_FOLDER as $child){
$html .= '<li>';
//count number of images in each root folder
$bubble_count = $child->MOVIE->count();
$html .= '<a href="'.$child->attributes()->indexI.'" data-rel="dialog" data-transition="slide">'.$child->attributes()->nameS.'<span class="ui-li-count">'.$bubble_count.'</span></a>';
$html .= ' </li>';
}
$html .= '</ul>';
//display image count, encode url/path
for($i = 0, $c = $xml->COM->MOVIE->count(); $i < $c; $i++ ){
$html .= '<ul data-role="listview" class="ui-listview" data-inset="true">';
$html .= '<li>';
$html .= '<a>
<img src="https://[url]'.rawurlencode($this->_decode_path($xml->COM->MOVIE[$i]->attributes()->dbIcoFilename)).'" id="imgThumb" alt="'.$xml->COM->MOVIE[$i]->attributes()->nameS.'" />
<h1>'.$xml->COM->MOVIE[$i]->attributes()->nameS.'</h1>
</a>';
$html .= ' </li>';
$html .= '</ul>';
}
}
else{
$data['output'] = $this->_makeoutput($folder_index);
}
return $html;
}
first off.. Why ‘private’?
the issue at hand is you need the ul tag outside of the for loop else you generate new lists (and that’s what you’re seeing):