Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Change Path

Started by Muut Archive 11 years ago · 4 replies · 338 views
11 years ago

Is it possbible to change the Pages path to another folder?

11 years ago

It is possible, it requires taking advantage of an undocumented feature that allows Grav's streams to be configured via a setup.php file. This is an advanced feature, and I don't recommend it really unless there's a really good reason.

If you really want to do it, i'll have to track down an example of this file. I don't seem to have one handy on this laptop.

11 years ago

Hey, thanks for your reply. Yes i really want to do it. I want to save the sites and all what i need for them in a network drive. The network drive has an address like ///bku/.../..../mysites/

I want to save the main files on all my PC's in the network and they show all the sites...

11 years ago

Ok, i'll try to rustle up an example file for you. One thing you might want to consider though, it to simply use symlinks to do this? That's how I do my development and it works fine.

11 years ago

Sorry for the late followup on this. I have some information for you. So turns out changing the user pages path is pretty simple and doesn't even need the setup.php file.

Simply copy the following chunk into user/config/streams.yaml and then edit as you need:

YAML
schemes:
  page:
    type: ReadOnlyStream
    paths:
      - /my/custom/pages_folder

You can add blocks for asset and image too. Have a look in the original system/config/streams.yaml for an example.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1322 9 years ago
Archive · by Muut Archive, 9 years ago
2 918 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2922 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago