Fixed album links
This commit is contained in:
parent
687e5b8fe3
commit
b1c9fd959c
@ -5,10 +5,12 @@ $app->get('/music1', function() use($app) {
|
||||
|
||||
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
|
||||
$songs = $albums[0]->songs;
|
||||
$links = $albums[0]->links;
|
||||
|
||||
$app->render('pages/music1.twig', [
|
||||
'albums' => $albums,
|
||||
'songs' => $songs,
|
||||
'links' => $links,
|
||||
]);
|
||||
|
||||
})->name('music1');
|
||||
@ -18,10 +20,12 @@ $app->get('/music2', function() use($app) {
|
||||
|
||||
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
|
||||
$songs = $albums[0]->songs;
|
||||
$links = $albums[0]->links;
|
||||
|
||||
$app->render('pages/music2.twig', [
|
||||
$app->render('pages/music1.twig', [
|
||||
'albums' => $albums,
|
||||
'songs' => $songs,
|
||||
'links' => $links,
|
||||
]);
|
||||
|
||||
})->name('music2');
|
||||
|
@ -28,10 +28,10 @@
|
||||
<hr />
|
||||
<p id="album-description">{{ albums[0].description }}</p>
|
||||
{% endif %}
|
||||
{% if albums[0].links %}
|
||||
{% if links %}
|
||||
<hr />
|
||||
<ul>
|
||||
{% for link in albums[0].links %}
|
||||
<ul style="padding-left:20px">
|
||||
{% for link in links %}
|
||||
<li>Buy on <a href="{{ link.link_ref }}">{{ link.link_name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@ -29,6 +29,14 @@
|
||||
<hr />
|
||||
<p id="album-description">{{ albums[0].description }}</p>
|
||||
{% endif %}
|
||||
{% if links %}
|
||||
<hr />
|
||||
<ul style="padding-left:20px">
|
||||
{% for link in links %}
|
||||
<li>Buy on <a href="{{ link.link_ref }}">{{ link.link_name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user