Help:Class: Difference between revisions

2,592 bytes added ,  24 October 2024
Line 104: Line 104:


*This template can be included multiple times on the page - This does...
*This template can be included multiple times on the page - This does...
*Use full wikitext instead of #template_display - This does...
*Use full wikitext instead of #template_display - You need to manually write out how you want template data to appear using MediaWiki's language, rather than relying on the automated or semi-automated display mechanisms provided by extensions like Cargo. This approach is chosen for greater control, customization, or when the display logic provided by extensions does not meet the specific needs or design requirements of the page.
**The options are
*** #template_display: This would be a parser function or a similar mechanism provided by extensions like Cargo or Semantic MediaWiki to display template data in a more formatted or structured way. When you use something like #template_display, it implies you're leveraging the extension's capabilities to handle how the template's content is shown, potentially simplifying the wikitext and making use of predefined display formats like infoboxes, tables, etc.
*** Full Wikitext: This means instead of relying on an extension's shorthand or parser functions to display data, you would write out the full wikitext yourself. This approach gives you complete control over how the information from templates is displayed. You're not using a pre-formatted display function provided by Cargo or another extension; instead, you're crafting how each piece of data from the template looks using standard MediaWiki markup. This could involve manually creating tables, divs, spans, and using inline styling or classes for layout and design.
**** Customization: You have the freedom to customize every aspect of how the data is presented. If you want a specific layout that's not easily achievable with the default settings of #template_display, you'd opt for full wikitext.
**** Complexity: It can be more complex and verbose because you're writing out all the formatting code instead of letting an extension handle it with simpler syntax.
**** Learning Curve and Maintenance: It might require a better understanding of MediaWiki syntax and potentially could be harder to maintain if the structure of your data or the desired display format changes frequently.
**** Performance: On some wikis, avoiding complex parser functions for every template might lead to slightly better performance in terms of page rendering time, especially if the wiki has many such templates, since parser functions can sometimes be computationally heavier than straightforward wikitext.
**** Compatibility: If there's a concern about compatibility with different extensions or future changes in how extensions handle template display, using full wikitext might ensure your pages look consistent regardless of changes in the extensions.


===Form name===
===Form name===