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