mirror of
https://github.com/standardebooks/web.git
synced 2025-07-20 22:33:57 -04:00
Define variable
This commit is contained in:
parent
34d00a582d
commit
173386dddf
1 changed files with 2 additions and 1 deletions
|
@ -45,6 +45,7 @@ try{
|
|||
// Pick a random tag from this ebook, and get ebooks in the same tag
|
||||
$carousel = [];
|
||||
$ebooks = [];
|
||||
$carouselTag = null;
|
||||
if(sizeof($ebook->Tags) > 0){
|
||||
$carouselTag = $ebook->Tags[rand(0, sizeof($ebook->Tags) - 1)];
|
||||
$ebooks = Library::GetEbooksByTag(strtolower($carouselTag->Name));
|
||||
|
@ -324,7 +325,7 @@ catch(Exceptions\InvalidEbookException $ex){
|
|||
|
||||
<? if(sizeof($carousel) > 0){ ?>
|
||||
<aside id="more-ebooks">
|
||||
<h2>More free <?= strtolower($carouselTag->Name) ?> ebooks</h2>
|
||||
<h2>More free<? if($carouselTag !== null){ ?> <?= strtolower($carouselTag->Name) ?><? } ?> ebooks</h2>
|
||||
<ul>
|
||||
<? foreach($carousel as $carouselEbook){ ?>
|
||||
<li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue