Needed a helper function to get clean path for github

This commit is contained in:
Andy Miller
2014-08-05 19:43:38 -06:00
committed by Djamil Legato
parent b5351cddf4
commit ce68c36910

View File

@@ -836,6 +836,16 @@ class Page
return $this->name ? $this->path . '/' . $this->folder . '/' . $this->name : null;
}
/**
* Gets the relative path to the .md file
*
* @return string The relative file path
*/
public function filePathClean()
{
return str_replace(ROOT_DIR, '', $this->filePath());
}
/**
* Gets and sets the path to the folder where the .md for this Page object resides.
* This is equivalent to the filePath but without the filename.