Page Schemas: Difference between revisions

1,662 bytes added ,  19:31, 12 November 2022
No edit summary
 
Line 25: Line 25:
A page is only ever loosely connected to a schema (rather than strictly, ie. can only have/requires the schema's fields) through its category. Page schemas then generates a template for the category. Typically templates will add a page to a category anyway ([ [Category:CategoryName] ]). So a page can have multiple schemas - that would just look like using multiple templates on the same page.
A page is only ever loosely connected to a schema (rather than strictly, ie. can only have/requires the schema's fields) through its category. Page schemas then generates a template for the category. Typically templates will add a page to a category anyway ([ [Category:CategoryName] ]). So a page can have multiple schemas - that would just look like using multiple templates on the same page.
|Link=https://discord.com/channels/1029514961782849607/1038988750677606432/1041059559541841940
|Link=https://discord.com/channels/1029514961782849607/1038988750677606432/1041059559541841940
}}
== Creating a new Schema ==
{{Message
|Author=sneakers-the-rat
|Avatar=https://cdn.discordapp.com/avatars/305044217393053697/2970b22bd769d0cd0ee1de79be500e85.png?size=1024
|Date Sent=22-11-12 19:32:48
|Channel=discourse-modeling
|Text=[[Page Schemas#Creating a new Schema]]
Page schemas is mostly a handy way to generate boilerplate templates and link them to semantic properties. A Form (using [[Page Forms]] is something that is an interface for filling in values for a template.
For an example of how this shakes out, see
[[:Category:Participant]]
[[Template:Participant]]
[[Form:Participant]]
* go to a `Category:CategoryName` page, creating it if it doesn't already exist.
* Click "Create schema" in top right
* If you want a form, check the "Form" box. it is possible to make a schema without a form. The schema just defines what pages will be generated, and the generated pages can be further edited afterwards (note that this might make them inconsistent with the schema)
* Click "add template" If you are only planning on having one template per category, name the template the same thing as the category.
* Add fields! Each field can have a corresponding form input (with a type, eg. a textbox, token input, date selector, etc.) and a semantic property.
* Once you're finished, save the schema
* Click "Generate pages" on the category page. Typically you want to uncheck any pages that are already bluelinks so you don't overwrite them. You might have to do the 'generate pages' step a few times, and it can take a few minutes, bc it's pretty buggy.
|Link=https://discord.com/channels/1029514961782849607/1038988750677606432/1041073096687370250
}}
}}