requarks / wiki-v1

Legacy version (1.x) of Wiki.js
https://wiki.js.org
GNU Affero General Public License v3.0
101 stars 75 forks source link

Multiple models (create-x.md, create-y.md) for entries #244

Open victoic opened 4 years ago

victoic commented 4 years ago

I'm trying to create models for different types of entries in a wiki. I've made the .md files and added the buttons in the navbar, for example:

create-lugar.md:

<!-- SUBTITLE: Visão geral sobre {TITLE} -->

# {TITLE}
# Informações
`Tipo`  
`Localização` 
`Sub Localizações` 
`Organização Dominante` `

create-pessoa.md:

<!-- SUBTITLE: Visão geral sobre {TITLE} -->

# {TITLE}
# Informações
`Nascimento` 
`Local de Nascimento` 
`Sexo Biológico` 
`Olhos` 
`Cabelo` 
`Altura` 
`Peso` 

Those are entry models that highly repeat information, so it would be helpfull to have some set data by default.

But I can't see to find how to make each button call a different .md file. I can not find how is the /create/* route called so I pass an extra variable to it or something similar to differentiate the create call from each button.

Is this viable? Or is the framework made to only have one type of entry?