Skip to content

Commit

Permalink
fix: a taxonomy page should not be a section
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Nov 17, 2023
1 parent a2e7928 commit 639a308
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Collection/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,16 @@ public function getSection(): ?string
return !empty($this->section) ? $this->section : null;
}

/**
* Unset section.
*/
public function unSection(): self
{
$this->section = null;

return $this;
}

/**
* Set body as HTML.
*/
Expand Down
1 change: 1 addition & 0 deletions src/Generator/Taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function generate(): void
->setPath($path);
if ($this->builder->getPages()->has($pageId)) {
$page = clone $this->builder->getPages()->get($pageId);
$page->unSection();
}
// creates page for each plural
$page->setType(Type::VOCABULARY)
Expand Down

0 comments on commit 639a308

Please sign in to comment.