Templates Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
  +
{{Forumheader|Help desk}}
βˆ’
{{Forumheader|Help desk}}<!-- Please put your content under this line. Be sure to sign your edits with four tildes: ~~~~ -->
+
<!-- Please put your content under this line. Be sure to sign your edits with four tildes: ~~~~ -->
   
βˆ’
So I'm trying to make a couple templates that are supposed to streamline other contributors adding data (some infobox templates and some templates that are each rows to go in a table).<br /><br />I've got them working just fine, save for a capitalization problem.<br /><br />Say I set "|a = Foo" on the content page. I have an image made by <nowiki>"[[File:{{{a}}}_icon.png]]" and a name next to it, "[[{{{a}}}]]"</nowiki> as it should.<br /><br />But I want to be able to set it up so that users could write "|a = foo" and it reinterpret "foo" to be "Foo" so as to not have broken links and non-caps titles. <nowiki>{{ucfirst:}} works, but say I need to put in Foo Bar, then {{ucfirst:}}</nowiki> would only net Foo bar, leaving it in almost sentence case.<br /><br />I've tried importing and using <nowiki>{{Fixcaps}} {{Title case}} and {{#invoke:String2|title}} and while they work fine on regular text and on [[links]]</nowiki> (for the most part), still none of them agree with parameters. They all try to just capitalize <nowiki>{{{a}}} to {{{A}}} before reading {{{a}}}</nowiki> for its contents.<br /><br />Are there any existing templates, or if not, is there any good place to start trying to make a template that'll fill this purpose?<br /><br />[[User:TerranTheMoose|TerranTheMoose]] ([[User talk:TerranTheMoose|talk]]) 21:51, July 24, 2018 (UTC)
+
So I'm trying to make a couple templates that are supposed to streamline other contributors adding data (some infobox templates and some templates that are each rows to go in a table).<br><br>I've got them working just fine, save for a capitalization problem.<br><br>Say I set "|a = Foo" on the content page. I have an image made by <nowiki>"[[File:{{{a}}}_icon.png]]" and a name next to it, "[[{{{a}}}]]"</nowiki> as it should.<br><br>But I want to be able to set it up so that users could write "|a = foo" and it reinterpret "foo" to be "Foo" so as to not have broken links and non-caps titles. <nowiki>{{ucfirst:}} works, but say I need to put in Foo Bar, then {{ucfirst:}}</nowiki> would only net Foo bar, leaving it in almost sentence case.<br><br>I've tried importing and using <nowiki>{{Fixcaps}} {{Title case}} and {{#invoke:String2|title}} and while they work fine on regular text and on [[links]]</nowiki> (for the most part), still none of them agree with parameters. They all try to just capitalize <nowiki>{{{a}}} to {{{A}}} before reading {{{a}}}</nowiki> for its contents.<br><br>Are there any existing templates, or if not, is there any good place to start trying to make a template that'll fill this purpose?
  +
[[User:TerranTheMoose|TerranTheMoose]] ([[User talk:TerranTheMoose|talk]]) 21:51, July 24, 2018 (UTC)
Please note that all contributions to the Templates Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)

Your changes will be shown immediately once you click the buttons below.

General symbols: ( ) / ? ! ; : ' " * & + # @ } { \ ] [ & ^ ~ β€’

Talk pages: ~~~ ~~~~ ~~~~~

Important notes
Back to editing area


Template used on this page: