Skip to content
This repository has been archived by the owner on Dec 27, 2018. It is now read-only.

Commit

Permalink
Fix "fileId" for homepage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Aug 8, 2018
1 parent a7d697e commit 37711a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Collection/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public function __construct(SplFileInfo $file = null)
// file name: "Post 1"
$this->fileName = basename($this->file->getBasename(), '.'.$this->fileExtension);
// file id: "Blog/Post 1"
$this->fileId = ($this->filePath ? $this->filePath.'/' : '').($this->fileName != 'index' ? $this->fileName : '');
$this->fileId = ($this->filePath ? $this->filePath.'/' : '')
.($this->filePath && $this->fileName == 'index' ? '' : $this->fileName);
/*
* variables default values
*/
Expand Down

0 comments on commit 37711a6

Please sign in to comment.