/** * [pages description] * @param [type] $folder [description] * @return [type] [description] */ public static function pages($folder) { if (strpos($folder, ':') === false && !self::$app->isAbsolutePath($folder)) { $path = "content:{$folder}"; } else { $path = $folder; } return \Copilot\PageCollection::fromFolder($path); }
/** * [siblings description] * @return [type] */ public function siblings($filter = null) { if ($this->isIndex()) { if ($this->isRootIndex()) { $collection = new PageCollection([]); } else { $collection = PageCollection::fromFolder(dirname($this->dir))->not($this); } } else { $collection = PageCollection::fromFolder($this->dir)->not($this); if (!$this->isIndex()) { $collection = $collection->not($this->parent()); } } // apply filter if ($filter && $collection->count()) { $collection = $collection->filter($filter); } return $collection; }