Template:Attribute Name Format: Difference between revisions
From Lilith's Throne
				
				
				Jump to navigationJump to search
				
				
Sightglass (Sọ̀rọ̀ | contribs) No edit summary  | 
				 Use Attribute Name Lookup on Attribute If Content Is Not Provided  | 
				||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
'''{{color|#{{Attribute Color Lookup|Attribute={{{Attribute}}}}}|{{#if: {{{Content|}}}|{{{Content}}}|{{{Attribute}}}}}}}'''<noinclude>  | '''{{color|#{{Attribute Color Lookup|Attribute={{uc:{{{Attribute}}}}}}}|{{#if: {{{Content|}}}|{{{Content}}}|{{Attribute Name Lookup|Attribute={{{Attribute}}}}}}}}}'''<noinclude>  | ||
<templatedata>  | <templatedata>  | ||
{  | {  | ||
	"params": {  | 	"params": {  | ||
		"  | 		"Attribute": {  | ||
			"aliases": [  | 			"aliases": [  | ||
				"Name  | 				"Name"  | ||
			],  | 			],  | ||
			"type": "string",  | 			"type": "string",  | ||
			"required": true  | 			"required": true,  | ||
			"description": "The name of the attribute to color-match."  | |||
		},  | 		},  | ||
		"  | 		"Content": {  | ||
			"aliases": [  | 			"aliases": [  | ||
				"Text  | 				"Text"  | ||
			],  | 			],  | ||
			"description": "The text, falls through to the attribute name if empty."  | 			"description": "The text, falls through to the attribute name if empty."  | ||
		}  | 		}  | ||
	},  | 	},  | ||
	"description": "Formats text for a format's name, looking up the color and applying bold. Uses the \"Attribute\" parameter to look up, displays \"Content\" (or \"Attribute\" if content is empty)."  | 	"description": "Formats text for a format's name, looking up the color and applying bold. Uses the \"Attribute\" parameter to look up, displays \"Content\" (or \"Attribute\" if content is empty)."  | ||
}  | }  | ||
</templatedata>  | </templatedata>  | ||
</noinclude>  | </noinclude>  | ||
Latest revision as of 21:22, 5 March 2024
{{{Attribute}}}
Formats text for a format's name, looking up the color and applying bold. Uses the "Attribute" parameter to look up, displays "Content" (or "Attribute" if content is empty).
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Attribute | Attribute Name | The name of the attribute to color-match.  | String | required | 
| Content | Content Text | The text, falls through to the attribute name if empty.  | Unknown | optional |