This is the
talk page for discussing
WikiProject Templates and anything related to its purposes and tasks. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8Auto-archiving period: 120 days |
Templates | ||||
|
As a frequent mobile web app user, it's a massive pain to add six straight apostrophes, because the keyboard resets to the letters section every time they are added. It would actually be faster to type a template for this. Even if you really hate the idea of multiple formatting options, there are probably a few systems where the straight apostrophes can't be typed at all, and typing {{ subst:bold}} would be quicker than looking up the relevant HTML code Mach61 ( talk) 14:24, 28 September 2023 (UTC)
Is there a templatespace version of a template like {{ Intentionally blank}} for use on subtemplates that are partially coded fractions of fully coded blocks, that need to assembled together to make visible sense? If this is enclosed in an INCLUDEONLY, the page will appear blank. They would be so coded because fractional blocks of code are nonfunctional and appear like random text to the average non-wikicoder, or would be throwing errors. Such a not-empty template would indicate there is hidden material on the page. -- 65.92.247.66 ( talk) 05:38, 5 January 2024 (UTC)
I need some help with some complex template coding that surpasses my ability — I already attempted a fix myself, which failed to actually produce the desired changes at all, so I need to call in the professionals.
The issue pertains to the {{ Canadian election result}} framework, a series of nested templates for making election results templates in Canadian elections. While its primary purpose has traditionally been for federal and provincial elections, it's also being used on some municipal (city or town) elections, which has undesirable side-effects: specifically, because it's designed principally for parliamentary elections, it presumes and autogenerates "YYYY [Jurisdiction] election results by riding" categories, but "by riding" is completely unapplicable to municipal council elections. Those may be conducted by ward, by borough or just at large, but there's never any such thing as a "riding" in a municipal election at all.
As things currently stand, this is a problem only affecting Montreal; there are some other cities using the framework, but they're consistently using nocat=yes to suppress the illogical categories — and other cities also aren't always using that framework as consistently as Montreal is, and are sometimes using other frameworks like the generic {{ MunElec}} instead. The problem in Montreal, specifically, is that there are a lot of templates involved, to the point where subbing them by year is warranted even if the "by riding" part is still undesirable, so just nocatting them all isn't the answer. Meanwhile, no other city has enough templates that by-year subcategories would be necessary at this time, though of course this may change in the future as formatting becomes more standardized.
So what I need is for that framework's category generation function to split municipal elections off to a separate category handler from provincial or federal elections, so that pages which are using municipal jurisdiction codes like MTL, TOR, OTT or VAN just produce "results" categories and not "results by riding" categories. Also, if possible, they should have the option of producing either "YYYY...results" or just undated "results", so that cities which have enough templates to support YYYY subcategories can have them while cities that don't need them can avoid them.
But again, when I tried to implement this myself, I completely failed to make the framework actually stop generating "by riding" categories on the municipal templates. So could somebody with actual skills help out? Thanks. Bearcat ( talk) 20:42, 17 January 2024 (UTC)
by riding
with by {{{riding_type|riding}}}
. That will enable you to specify something like {{
Canadian election result/top|MTL|2008|Anjou|riding_type=borough}}
that should populate the category of "Montreal election results by borough". If you have a better parameter name than "riding_type", please go with it, but that's what came off the top of my head.
Van
Isaac, GHTV
cont
WpWS 23:37, 17 January 2024 (UTC)
Kind of excited for this, as it makes one of the most difficult templates out there into something very easy to use. {{ CSS image crop}} literally requires you to do math - somewhat complicated math at that - for basic things like "making the cropped image slightly smaller" or "wanting to leave the bottom of the image in the crop".
With this one?
{{Easy CSS image crop
|Image = Theodore Roosevelt by the Pach Bros.jpg
|crop_left_perc = 10
}}
... is a perfectly viable and functional way to say I want to crop 10 percent from the left of the image, using the default 220px width for the end result. And if I want to make it bigger? I could add |desired_width = 300
...and it will scale, keeping the same crop, whereas with {{
CSS image crop}} I need to apply scaling ratios to every single numerical value, and I certainly wouldnðt be able to have only one
Now, I've not put it in articles yet. (I have tested it) so this is a good time to decide if any parameters should be renamed, if anything could be simplified further, or anything else like that. But I am right in thinking this actually makes it much more useful, right?
I've made a centralised discussion over on the Village Pump Adam Cuerden ( talk)Has about 8.8% of all FPs. 11:02, 31 January 2024 (UTC)
There is a requested move discussion at Template talk:User access levels#Requested move 30 January 2024 that may be of interest to members of this WikiProject. ❯❯❯ Raydann (Talk) 17:34, 7 February 2024 (UTC)
In what sense are the templates in Category:Unified table cell templates "unified"? Can someone add some documentation to this category page? The category was created by Crissov in 2014. I thought perhaps it referred to templates with shared documentation at Template:Table cell templates/doc, but that does not appear to be the case, eg. Template:Hell no. Perhaps it refers to templates created using the instructions at Template:Table cell templates/doc § Creating new templates Daask ( talk) 19:26, 14 February 2024 (UTC)
Project members may be interested in this VPT discussion concerning template loop detection. Mathglot ( talk) 22:13, 22 February 2024 (UTC)
Template:Education in Lamar County, Texas BurgeoningContracting 16:40, 28 February 2024 (UTC)
I started a discussion at Wikipedia talk:Short description § Bug report: Template code to auto-generate short descriptions fails to work. Maybe it should have been better placed here. If anyone is familiar with "coding" inside templates, please check out the discussion. Thank you. ▶ I am Grorp ◀ 20:31, 5 March 2024 (UTC)
Hello. I have a question. Can a sidebar be turned into a horizontal navbox? If so, is there guidance about it? I noticed the sidebar in the article Chairman of the National Assembly of Vietnam is causing issues because there is a table that causes a big unsightly blank space before it. A horizontal navbox would better serve the page. Sincerely, -- Thinker78 (talk) 20:08, 9 March 2024 (UTC)
There is a discussion that may be of your interest, at Template talk:GeoTemplate#Splitting Global/Trans-national services. Your input is welcomed. Sincerely, Thinker78 (talk) 23:15, 17 March 2024 (UTC)
Would someone mind taking a look at {{ Operant conditioning}}? It looks like someone trying to create a chart did so as a template instead of an image. I noticed this after checking on some other stuff in the article Reinforcement. The template is being used in Reinforcement#Operant conditioning and it's so wide that it pretty much takes up the entire section. This was a question asked about the template's width on its talk page, but nobody seems to have responded and nobody else seems to have commented on why an image needs to be a template. -- Marchjuly ( talk) 01:22, 25 April 2024 (UTC)
This is the
talk page for discussing
WikiProject Templates and anything related to its purposes and tasks. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8Auto-archiving period: 120 days |
Templates | ||||
|
As a frequent mobile web app user, it's a massive pain to add six straight apostrophes, because the keyboard resets to the letters section every time they are added. It would actually be faster to type a template for this. Even if you really hate the idea of multiple formatting options, there are probably a few systems where the straight apostrophes can't be typed at all, and typing {{ subst:bold}} would be quicker than looking up the relevant HTML code Mach61 ( talk) 14:24, 28 September 2023 (UTC)
Is there a templatespace version of a template like {{ Intentionally blank}} for use on subtemplates that are partially coded fractions of fully coded blocks, that need to assembled together to make visible sense? If this is enclosed in an INCLUDEONLY, the page will appear blank. They would be so coded because fractional blocks of code are nonfunctional and appear like random text to the average non-wikicoder, or would be throwing errors. Such a not-empty template would indicate there is hidden material on the page. -- 65.92.247.66 ( talk) 05:38, 5 January 2024 (UTC)
I need some help with some complex template coding that surpasses my ability — I already attempted a fix myself, which failed to actually produce the desired changes at all, so I need to call in the professionals.
The issue pertains to the {{ Canadian election result}} framework, a series of nested templates for making election results templates in Canadian elections. While its primary purpose has traditionally been for federal and provincial elections, it's also being used on some municipal (city or town) elections, which has undesirable side-effects: specifically, because it's designed principally for parliamentary elections, it presumes and autogenerates "YYYY [Jurisdiction] election results by riding" categories, but "by riding" is completely unapplicable to municipal council elections. Those may be conducted by ward, by borough or just at large, but there's never any such thing as a "riding" in a municipal election at all.
As things currently stand, this is a problem only affecting Montreal; there are some other cities using the framework, but they're consistently using nocat=yes to suppress the illogical categories — and other cities also aren't always using that framework as consistently as Montreal is, and are sometimes using other frameworks like the generic {{ MunElec}} instead. The problem in Montreal, specifically, is that there are a lot of templates involved, to the point where subbing them by year is warranted even if the "by riding" part is still undesirable, so just nocatting them all isn't the answer. Meanwhile, no other city has enough templates that by-year subcategories would be necessary at this time, though of course this may change in the future as formatting becomes more standardized.
So what I need is for that framework's category generation function to split municipal elections off to a separate category handler from provincial or federal elections, so that pages which are using municipal jurisdiction codes like MTL, TOR, OTT or VAN just produce "results" categories and not "results by riding" categories. Also, if possible, they should have the option of producing either "YYYY...results" or just undated "results", so that cities which have enough templates to support YYYY subcategories can have them while cities that don't need them can avoid them.
But again, when I tried to implement this myself, I completely failed to make the framework actually stop generating "by riding" categories on the municipal templates. So could somebody with actual skills help out? Thanks. Bearcat ( talk) 20:42, 17 January 2024 (UTC)
by riding
with by {{{riding_type|riding}}}
. That will enable you to specify something like {{
Canadian election result/top|MTL|2008|Anjou|riding_type=borough}}
that should populate the category of "Montreal election results by borough". If you have a better parameter name than "riding_type", please go with it, but that's what came off the top of my head.
Van
Isaac, GHTV
cont
WpWS 23:37, 17 January 2024 (UTC)
Kind of excited for this, as it makes one of the most difficult templates out there into something very easy to use. {{ CSS image crop}} literally requires you to do math - somewhat complicated math at that - for basic things like "making the cropped image slightly smaller" or "wanting to leave the bottom of the image in the crop".
With this one?
{{Easy CSS image crop
|Image = Theodore Roosevelt by the Pach Bros.jpg
|crop_left_perc = 10
}}
... is a perfectly viable and functional way to say I want to crop 10 percent from the left of the image, using the default 220px width for the end result. And if I want to make it bigger? I could add |desired_width = 300
...and it will scale, keeping the same crop, whereas with {{
CSS image crop}} I need to apply scaling ratios to every single numerical value, and I certainly wouldnðt be able to have only one
Now, I've not put it in articles yet. (I have tested it) so this is a good time to decide if any parameters should be renamed, if anything could be simplified further, or anything else like that. But I am right in thinking this actually makes it much more useful, right?
I've made a centralised discussion over on the Village Pump Adam Cuerden ( talk)Has about 8.8% of all FPs. 11:02, 31 January 2024 (UTC)
There is a requested move discussion at Template talk:User access levels#Requested move 30 January 2024 that may be of interest to members of this WikiProject. ❯❯❯ Raydann (Talk) 17:34, 7 February 2024 (UTC)
In what sense are the templates in Category:Unified table cell templates "unified"? Can someone add some documentation to this category page? The category was created by Crissov in 2014. I thought perhaps it referred to templates with shared documentation at Template:Table cell templates/doc, but that does not appear to be the case, eg. Template:Hell no. Perhaps it refers to templates created using the instructions at Template:Table cell templates/doc § Creating new templates Daask ( talk) 19:26, 14 February 2024 (UTC)
Project members may be interested in this VPT discussion concerning template loop detection. Mathglot ( talk) 22:13, 22 February 2024 (UTC)
Template:Education in Lamar County, Texas BurgeoningContracting 16:40, 28 February 2024 (UTC)
I started a discussion at Wikipedia talk:Short description § Bug report: Template code to auto-generate short descriptions fails to work. Maybe it should have been better placed here. If anyone is familiar with "coding" inside templates, please check out the discussion. Thank you. ▶ I am Grorp ◀ 20:31, 5 March 2024 (UTC)
Hello. I have a question. Can a sidebar be turned into a horizontal navbox? If so, is there guidance about it? I noticed the sidebar in the article Chairman of the National Assembly of Vietnam is causing issues because there is a table that causes a big unsightly blank space before it. A horizontal navbox would better serve the page. Sincerely, -- Thinker78 (talk) 20:08, 9 March 2024 (UTC)
There is a discussion that may be of your interest, at Template talk:GeoTemplate#Splitting Global/Trans-national services. Your input is welcomed. Sincerely, Thinker78 (talk) 23:15, 17 March 2024 (UTC)
Would someone mind taking a look at {{ Operant conditioning}}? It looks like someone trying to create a chart did so as a template instead of an image. I noticed this after checking on some other stuff in the article Reinforcement. The template is being used in Reinforcement#Operant conditioning and it's so wide that it pretty much takes up the entire section. This was a question asked about the template's width on its talk page, but nobody seems to have responded and nobody else seems to have commented on why an image needs to be a template. -- Marchjuly ( talk) 01:22, 25 April 2024 (UTC)