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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Media page unified directory

Started by Guillaume Storchi 6 years ago · 4 replies · 464 views
6 years ago

Is ther any way to save all pages media in a separate data/media/pages/04.events/ folder ?
It would be nicer for work with git and for sync dev and prod environment !
Thanks in advance

6 years ago

There is nothing in Grav preventing you from storing page media files in directories like data/media/pages/04.events/ and for instance data/media/pages/05.about-us/.

Of course you would need to adjust your theme templates so it gets the images from this alternative location.

The downside is that this way of saving page media files is not supported by the Admin Plugin user interface. So there is no support for it out of the box. Which I think makes the whole concept a lot less attractive.

6 years ago

I think this would e great as a ne feature. Allowing to choose an main directory for pages' images would make sources easier to manage with git.

Drupal, Wordpress store their images in a separate dir which aovid to store binaries in git.

What do you think about this ? Maybe a plugin could be written to achieve this.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago