mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
Needed a helper function to get clean path for github
This commit is contained in:
committed by
Djamil Legato
parent
b5351cddf4
commit
ce68c36910
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user