diff --git a/src/Element/Book.php b/src/Element/Book.php index 03e2f98..8601f76 100644 --- a/src/Element/Book.php +++ b/src/Element/Book.php @@ -54,7 +54,7 @@ class Book { } public function getHtml (): string { - return "
  • $this->name
  • "; + return "
  • getId()==$this->id?"":" href='/$this->id'") . ">$this->name
  • "; } /** @@ -64,4 +64,4 @@ class Book { return BookContented::parseString(file_get_contents("./data/$this->id/book.xml")); } -} \ No newline at end of file +} diff --git a/src/Element/BookCollection.php b/src/Element/BookCollection.php index 9a424da..da071dd 100644 --- a/src/Element/BookCollection.php +++ b/src/Element/BookCollection.php @@ -72,7 +72,7 @@ class BookCollection { public function getHtml (): string { $str = ""; - if ($this->name != self::ROOT) $str .= "
  • $this->name