Community Central
Community Central

Many communities use quote templates to highlight notable snippets of text such as lyrics, book passages, spoken phrases, or extracts from interviews or news articles. These templates can contain quotes from a single source, dialogues, etc.

Previous considerations[]

They work similarly to other templates, you can add different parameters, use wikitext, add images, use HTML markup, parser functions and other variables, etc. But there are some rules that have to be respected:

  1. The new quote template has to be called "Template:StructuredQuote", but it can be renamed and will work while the redirection is in the original template.
  2. It won't work as a Structured Content if the template is invoked using the regular markup {{StructuredQuote}}. This template has its own syntax.
  3. Every quote should have an unique ID, they won't work if you use the same ID for different quotes. Only the first one using that ID will be considered the legit one. This ID has to be unique, but it can be a number, a word, or a combination of both.
  4. Multiple links can be added to the parameters, for example more than one character can be attributed to the quote, but this template isn't optimized to include dialogs.
  5. Although you can add more parameters, only id, text, speaker, receiver, attribution and source will be stored in the database. The other custom parameters will appear only in the article where they are used, not in others if the quote is invoked via the ID.
  6. The parameters speaker, receiver, attribution and source will have to be an internal link, but you will be able to link a non-created page.

Template creation[]

In order to create a valid template, you will have to call it "Template:StructuredQuote". As we said, it can be renamed, but it will work only if there is a redirection from the original name.

Wikitext is working in this template, just like any other template. The next code can be used to create a simple version of this template with all the parameters that will be stored:

<onlyinclude>:"''{{{text}}}''"
:— <small>speaker: {{{speaker}}}
:- receiver: {{{receiver}}}
:- attribution {{{attribution}}}
:- source: {{{source}}}</small>
</onlyinclude>

Although the template has the same behavior as a regular template, the markup for invoking the template into the articles differs. Assuming you are using the default parameters used in the example above, you will have to use the next syntax for using the template in the articles:

{{#SQuote:
  id = <unique identifier>
  |text = <quote text>
  |speaker = <character's speaking (wikitext links)>
  |receiver = <reciver of the quote (wikitext links)>
  |attribution = <attribution (wikitext links)>
  |source = <attribution (wikitext links)>
}}

It isn't possible to use the template in the articles using {{StructuredQuote|id=....}}, it won't render the template correctly and the structured quote won't be stored in our database. It only works with the previous markup.

Design customizations[]

It is possible to customize the design of the templates as for any other template, you can use wikitext, HTML, JS, Lua, CSS and inline styles.

Please check our Customization Policy to learn more details about what can be customized on our platform.

Querying[]

One of the main advantages of the Structures Quotes is the possibility to query quotes from the articles without having to update the page everytime than a new quote is added to the wiki. The queries can be added to any page by using a special parser function: #SQuoteQuery.

{{#SQuoteQuery:
  limit = <number of quotes to show>
  |speaker = <individual(s) who uttered or wrote the quoted words (wikitext links, comma-separated)>
  |receiver = <person(s) the quote was spoken to (wikitext links, comma-separated)>
  |attribution = <attribution (wikitext links, comma-separated)>
  |source = <place where it was spoken (wikitext link)>
}}

This will allow you to add multiple quotes in an article without having to manually add them, and the content of those quotes will be updated when the original quote is changed.

The quotes will appear with the same style than the original quote in the articles.

For the testing wikis[]

Every community has its own way to use quotes, dialogues, etc. Some wikis integrate the quotes inside the infoboxes, others prefer to use them at the beginning of their articles, others use quotes in specific sections... We want to test how this new format is adapted to your multiple realities, please use this template in your articles trying to emulate the original design of your quotes, make them complex, or simple if you want.

We want to be sure this format will work in a real environment. And please note everything that you think would be interesting to add or something that doesn't work as it should, we will work on finding a solution.

If you want to participate in the early tests, please contact to our the Product Support Owner and he will share more details about the process.

Next steps[]

We are working on a way to invoke the content of the quotes from other articles only using the ID of the original quote, in addition to create an user interface to facilitate the creation of new quotes, but we are open to more additions!

Please contact to your Community Manager or the Product Support Owner to ask any questions or share your feedback with us. We will take it into consideration for future stages.