diff --git a/src/Collection/Page/Page.php b/src/Collection/Page/Page.php index 06bc085..9e05090 100644 --- a/src/Collection/Page/Page.php +++ b/src/Collection/Page/Page.php @@ -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 */