The posts in the plugin category and so on always have a table at the top, showing some metadata.
I am wondering, is this simply a markdown table in the post template or is there a feature/plugin to prompt the user for this metadata?
I tried searching for it, but sadly I can only find results for TOC generation which is something different. So any hint as to how these tables are called (if they are a feature) would be appreciated
It is a markdown table. It is part of the topic template.
||||
|-|-|-|
| :information_source: | **Summary** | ADD SHORT SUMMARY
| :eyeglasses:|**Preview**| PREVIEW_LINK |
| :hammer_and_wrench:|**Repository**| REPOSITORY_LINK |
| :question:|**Install Guide**|[How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)|
| :open_book:|**New to Discourse Themes?**| [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966)
<!-- Describe this theme in one or two sentences -->
Short description...
<!-- Add screenshots (if applicable) -->
Screenshots...
<!-- Add more details and explain the settings (if applicable) -->
Detailed description...
Thanks for the answer! That explains why I couldn’t find any feature for it.
For my usecase I want to make it easy for users to enter this metadata, even if they aren’t used to markdown. So I’ll probably see if I can make a custom plugin, just didn’t want to reinvent the wheel in case it already exists.
I’ve seen that one, but I don’t think it’s useful for pre-defined stuff. Basically I want to create a topic template with a table on top, but only show a few input fields to the user plus the usual free-text post. Kinda like issue templates on GitHub (example) where the user is prompted for some fields.
But yeah if it’s not built in, then that’s fine. I think I can come up with a plugin or other solution. So thanks for confirming I’m not reinventing the wheel here
The new templates are designed for exactly your use case. You shouldn’t need a plugin. The caveat being that the formatting of the post seems to be fairly limited and is created as plain markdown so subsequent edits see the raw markdown.
Yeah I’ve just tried the form templates and found them to be a bit limiting. I want a form thing in addition to the normal post text, because I want users to still be able to format their text using the default WYSIWYG markdown editor. And the form templates only support basic text boxes, so no fancy editing. I basically only want one or two required fields, and then the normal post editor.
(I do understand that I have a quite specific requirement, and this is not meant as bashing form templates! They are super useful in itself and I might use them for another thing even, just for this usecase I find them to not be what I want)
Don’t mean to be annoying but I wouldn’t describe the default editor as “WYSIWYG”. In fact the lack of that has been a subject of much debate … but I digress
Sorry, it may have been the wrong word then. I only used it to differentiate between the markdown editor with formatting support, and the bare bones textareas of the form templates. The markdown editor is simple enough for people that aren’t used to it since it has a toolbar, while the bare bones textareas don’t make it obvious how to style your text. Plus the form templates don’t seem to provide a preview while the markdown editor does.
So yeah, WYSIWYG may have been the wrong word, what I meant is the default markdown editor that has a preview to show what you get.
Yes exactly, or at least an option to make the form template additional, so the stuff from the form would get rendered above the post instead of replacing the post editor completely. Both ways would work for my usecase
Yeah, even if only one template could get the full editor, that would be great, but I’m not sure how that would work. The work-around in the short term is to just enter some text as a placeholder, create the topic, and then edit it to make things pretty.
Do you think a PR changing the form template feature to support this would be accepted? Though I’m not sure yet if I’ll find the time to actually implement this
Just a quick note, you can use Excel or Google Sheets and copy and paste them into the editor and it does the markdown for you. I run sports pools on another forum and I copy my Google Sheets reports this way and it’s super easy. I’ve made some pretty big tables in seconds this way.