MEH-Design / frix

A CMS based on atomic design principles.
MIT License
2 stars 1 forks source link

global component data #84

Open MiniXC opened 7 years ago

MiniXC commented 7 years ago

Allow component data to span across multiple pages. This adds a new folder to frix's structure globals, contain simple json files that can be injected into content json files using the following syntax.

"&globals": {
    "navbar": ["header", "navigation"],
    "title": []
  }
bminixhofer commented 7 years ago

TODO: write tests for this.

MiniXC commented 7 years ago

I think we have to somehow change this to set the globals directly from the template. Something like this?

<title text-content="title" global="title">

This makes more sense than referencing the global from the json itself. There are no globals that aren't global. But with the current solution, globals can or cannot be used on a json-to-json basis.