I'm creating a plugin that stores a custom file in a subdirectory of the page being edited when the page is saved. To do this I'm adding a custom form processing action, and in the action the plugin will create a subdirectory. I need to know how to get the file system path to the current page.
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Archive
Try $mypath = $this->grav['uri'];
Not sure how I missed that in the API docs. Thanks.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1297 | 9 years ago | ||
| 2 | 894 | 9 years ago | ||
| 2 | 4024 | 9 years ago | ||
| 1 | 2899 | 9 years ago | ||
| 3 | 1082 | 9 years ago |