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

The best way to provide site-wide data?

Started by P. Fighter 8 years ago · 4 replies · 968 views
8 years ago

Hi, I have a bunch of header data in my home template which I need to use in the content of other templates. It's fairly trivial to use page.find within their Twig markup to locate the home page and fetch the data there but it seems a little off...

Is there a way to offer data storage in a similar way to the admin page blueprint forms, but readily available site-wide?

1 reply
8 years ago

The Flex Directory Plugin stores data in the 'user/data' folder and contains Twig templates for you to use as examples how to use that data in your templates.

👍 1
8 years ago

Apparently future versions of Grav (v2?) will have a feature called "content blocks" but there's nothing written about it, so not sure if that will be along the lines of what you are asking about.

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago