function album_song_list($songList)
{
    /* Load the Song list */
    foreach ($songList as $song) {
        $title = $song->track_title;
        $trackId = $song->track_id;
        $price = $song->track_price;
        echo a_open("list-group-item", base_url() . "cart/add/track/{$trackId}");
        echo "<span class='badge'>\${$price}.00</span>";
        echo $title;
        echo a_close();
    }
}
<div class="col-sm-12">
	<div class="page-header">
		<h2><span class="glyphicon glyphicon-gift"></span>Más Productos <a href=""><small> / Tienda Balerom</small></a></h2>
	</div>
<!-- Thumbnails -->
<div class="row">
<?php 
for ($i = 1; $i <= 4; $i++) {
    echo div_open("col-xs-6 col-md-3");
    echo a_open("thumbnail", "#");
    echo img("http://placehold.it/500x300");
    echo a_close();
    echo div_close();
}
?>
</div>
</div>
    $year = $album->album_year;
    $price = $album->album_price;
    $url = base_url() . "album/{$id}/" . strToUrl($title);
    echo a_open("list-group-item", "{$url}");
    echo "{$title} ({$year})";
    echo "<span class='badge'>\${$price}</span>";
    echo a_close();
}
?>
</div>

<div class="list-group">
<a class="list-group-item active">Sencillos</a>
	<?php 
// Get list of most selled albums
$query = $this->db->order_by('song_year DESC');
$query = $this->db->get('db_song');
$topsong = $query->result();
foreach ($topsong as $song) {
    $id = $song->song_id;
    $title = $song->song_title;
    $year = $song->song_year;
    $price = $song->song_price;
    $url = base_url() . "song/{$id}/" . strToUrl($title);
    echo a_open("list-group-item", "{$url}");
    echo "{$title} ({$year})";
    echo "<span class='badge'>\${$price}</span>";
    echo a_close();
}
?>
</div>
            echo a_open('list-group-item', $url);
            echo "{$title} ({$year})";
            echo a_close();
        }
        echo div_close();
        echo div_close();
    }
    // Case: Found a match in Songs from an album
    if ($albumSongCount > 0) {
        echo br();
        echo div_open('col-sm-12 col-md-6');
        echo heading("Canciones ({$albumSongCount})", 4, array('class' => 'page-header'));
        echo div_open('list-group');
        foreach ($albumSongList as $song) {
            $id = $song->track_id;
            $title = $song->track_title;
            $url = base_url() . "album/{$id}/" . strToUrl($title);
            echo a_open('list-group-item', $url);
            echo $title;
            echo a_close();
        }
        echo div_close();
        echo div_close();
    }
}
?>

	</div>


</div>
  <li><a href="<?php 
echo base_url();
?>
">Inicio</a></li>
  <li class="active">Albums</li>
</ol>

<div class="container">
	<div class="row">
		<div class="col-sm-12">
			<div class="page-header">
				<h2><span class="glyphicon glyphicon-cd"></span>&nbsp;Discos de Estudio</h2>
			</div>
			<?php 
foreach ($albumList as $album) {
    $id = $album['album_id'];
    $title = $album['album_title'];
    $year = $album['album_year'];
    echo div_open("col-xs-6 col-md-2 hvr-underline-from-center");
    echo a_open("thumbnail", base_url() . "album/{$id}");
    echo img("data/music/albums/{$id}/cover.png");
    echo a_close();
    echo heading($title . nbs(3) . $year, 5);
    echo div_close();
}
?>
	
		</div>
	</div>
</div>
        <table class="table">
          <thead>
            <td><strong>#</strong></td>
            <td><strong>Producto</strong></td>
            <td><strong>Titulo</strong></td>
            <td><strong>Precio</strong></td>
            <td class="text-right"><strong>Opciones</strong></td>
            <td>&nbsp;</td>
          </thead>
          <tbody>
            <?php 
$i = 1;
foreach ($this->cart->contents() as $items) {
    $id = $items['rowid'];
    $link = a_open('link', base_url() . "cart/delete/{$id}") . "eliminar" . a_close();
    $type = 'Desconocido';
    switch ($items['type']) {
        case '1':
            $type = "Album";
            break;
        case '2':
            $type = "Cancion de Album";
            break;
        case '3':
            $type = "Sencillo";
            break;
        case '4':
            $type = "Video";
            break;
        case '5':
    $title = $album['album_title'];
    $year = $album['album_year'];
    // Remove special characters from name (for the url)
    $url = str_replace(array(' ', '.'), array('_', ''), $album['album_title']);
    echo div_open("col-xs-6 col-md-3 hvr-underline-from-center");
    echo a_open("thumbnail", "album/{$id}/{$url}");
    echo img("data/music/albums/" . $id . "/cover.png");
    echo a_close();
    echo heading($title . nbs(3) . $year, 5);
    echo div_close();
}
// Gets the list of featured songs and outputs its content in the slider
$query = $this->db->order_by('song_year DESC');
$query = $this->db->get_where('db_song', array('isFeatured' => 1));
foreach ($query->result_array() as $song) {
    $id = $song['song_id'];
    $title = $song['song_title'];
    $year = $song['song_year'];
    // Remove special characters from name (for the url)
    $url = str_replace(array(' ', '.'), array('_', ''), $song['song_title']);
    echo div_open("col-xs-6 col-md-3 hvr-underline-from-center");
    echo a_open("thumbnail", "song/{$id}/{$url}");
    echo img("data/music/singles/" . $id . "/cover.png");
    echo a_close();
    echo heading($title . nbs(3) . "(Sencillo)", 5);
    echo div_close();
}
?>
</div>

</div>