RML Templates: Difference between revisions

MjnMixael (talk | contribs)
Created page with "{{RML}} Templates allow defining a set of RML objects for the Lua to use for creating and styling repeated UI elements. TODO Further explain WTF that means. ==<template>== T..."
 
MjnMixael (talk | contribs)
Replaced content with "{{SCPUI moved|https://github.com/MjnMixael/SCPUI/wiki/RML-Templates}}"
Tag: Replaced
 
Line 1: Line 1:
{{RML}}
{{SCPUI moved|https://github.com/MjnMixael/SCPUI/wiki/RML-Templates}}
Templates allow defining a set of RML objects for the Lua to use for creating and styling repeated UI elements.
 
TODO Further explain WTF that means.
 
==<template>==
The <template> element has two uses, to define a template and inject a template inline into an existing RML documents.
 
When defining a template, <template> should be used in place of <rml>.
 
===Attributes===
 
====name====
The name of the template. Must be unique. Is used by other RML documents to reference the template.
====content====
The id of the element that the content will be put into.
When injecting a template, all elements inside the <template> tag will be placed inside the template’s content element.
====src====
The name of the template to inject
 
==<body>==
The <body> element has a template attribute that is a shorthand for injecting a template around the body tag.
 
===Attributes===
 
====template====
The name of the template to use. All child elements under the <body> element will be loaded into the template.

Latest revision as of 18:32, 28 October 2026

This page has moved. SCPUI documentation now lives on the SCPUI GitHub wiki.
See the new version of this page. The old content is still available in this page's history.