Rust-CMS / radical

A Rusty Wordpress Replacement.
MIT License
59 stars 7 forks source link

System for non-created fields so API consumers can know what to populate. #27

Open SpBills opened 3 years ago

SpBills commented 3 years ago

Program Version.

v0.1.0

Problem Description.

System for non-created fields so API consumers can know what to populate.

Imagine a client consuming this API, and wants to populate a page. They request the page, and get all fields that have already been populated back. However, the fields that have not been populated only exist in the HTML. With such, the API consumer must have an idea of what fields are expected to be present for the HTML to function.

It would be useful for a template parsing system that finds all variables and logs them in a database so they can be populated without preexisting knowledge of the expected fields defined in the HTML.

Problem Solutions.

Perhaps the modules table can be prepopulated on page save.

Other Details.

Processwire doesn't do this, but it may be nice? It also may be limiting.

For instance, you want to add a variable that spans multiple pages. It may be limiting to say that a only exists for page /. (note: this is how it is currently done, but without variable definition).

https://processwire.com/docs/tutorials/hello-worlds/