Template:Service: Difference between revisions

From MuHack
Jump to navigation Jump to search
(Undo revision 448 by Ceres-c (talk))
Tag: Undo
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
You can use this in a page to make it part of [[:Category:Services]].
You can use this in a page to make it part of [[:Category:Services]].

The "Service URI" field in the form expects (comma-separated) tokens in the format: <code>name;uri:port</code> (port is optional).

For example, if you input:
* Token 1: <code>Main API;api.example.com:8080</code>
* Token 2: <code>Website;www.example.com:443</code>

The URI section below will render as:
{| class="wikitable" style="width: auto;"
! colspan=2| ''URIs''
|-
| style="vertical-align:top; padding-left: 10px;" | Main API
| api.example.com:8080
|-
| style="vertical-align:top; padding-left: 10px;" | Website
| www.example.com:443
|}

Or, using #arraymap for a live example:
{| class="wikitable" style="width: auto;"
|- style="background: {{Style|header}}; text-align:center;"
! colspan=2| ''URIs''
{{#arraymap:Main API;api.example.com:8080, Website;www.example.com:443|,|@@item@@|
{{!}}-
{{!}} style="vertical-align:top; padding-left: 10px;" {{!}} {{#explode:@@item@@|;|0}}
{{!}} {{#explode:@@item@@|;|1}}
{{!}}-
}}
|}

</noinclude>
</noinclude>
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="float:right; clear:right; width:370px; margin:5px 0 1em 1em; border-collapse:collapse; font-size:95%; empty-cells:hide"
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="float:right; clear:right; width:370px; margin:5px 0 1em 1em; border-collapse:collapse; font-size:95%; empty-cells:hide"
Line 34: Line 64:
|- style="background: {{Style|header}}; text-align:center;"
|- style="background: {{Style|header}}; text-align:center;"
! colspan=2| ''URIs''
! colspan=2| ''URIs''
{{#arraymap:{{{Service URI|}}}|,|
{{#arraymap:{{{Service URI|}}}|,|@@item@@|
|-
{{!}}-
| style="vertical-align:top" | {{#strbefore:{{{.}}}|;}}
{{!}} style="vertical-align:top; padding-left: 10px;" {{!}} {{#explode:@@item@@|;|0}}
{{!}} [[Service URI::{{#explode:@@item@@|;|1}}]]
| {{#strafter: {{!.}} |;}}
{{!}}-
}}
}}
|}<includeonly>[[Category:Services|{{{Name}}}]]</includeonly>
|}<includeonly>[[Category:Services|{{{Name}}}]]</includeonly>

Revision as of 14:36, 25 May 2025

You can use this in a page to make it part of Category:Services.

The "Service URI" field in the form expects (comma-separated) tokens in the format: name;uri:port (port is optional).

For example, if you input:

  • Token 1: Main API;api.example.com:8080
  • Token 2: Website;www.example.com:443

The URI section below will render as:

URIs
Main API api.example.com:8080
Website www.example.com:443

Or, using #arraymap for a live example:

URIs
Main API api.example.com:8080
Website www.example.com:443


Service: Service
Operational Status
Super Users
Owner {{{Owner}}}
Last Update 2025-05-25
URIs