Template talk:Col-break

(Redirected from Template talk:Col-break/sandbox)
Latest comment: 1 year ago by 64.229.90.172 in topic {{Row-break}}

Fix empty parameter

edit

{{editprotected}} The part style="padding-left:{{{gap|}}};", if gap is not specified, results in incorrect inline CSS style="padding-left:;". Please put some number as default (e.g. {{{gap|1px}}} ) or use {{#if: {{{gap|}}} | style="padding-left:{{{gap|}}};" }}Alex Smotrov 20:53, 11 July 2007 (UTC)Reply

done. — Carl (CBM · talk) 03:17, 12 July 2007 (UTC)Reply

Edit request

edit

{{editprotected}}

Please replace:

{{Col-begin/doc}}

by

{{template doc}}

16@r 15:43, 20 October 2007 (UTC)Reply

Done. mattbr 07:56, 22 October 2007 (UTC)Reply

The template doc should explain that it works in tandem with {{col-begin}} and {{col-end}}. --Sasoriza (talk) 15:52, 16 February 2008 (UTC)Reply

Avoiding renumbering

edit

How can I avoid renumbering "#entrym" "#entryn" when it starts a new column (break) between them. I want to continue the series, not interrupt it. Thanks. That is, the sequence starts over again with "1" which is not wanted. Student7 (talk) 23:28, 14 June 2008 (UTC)Reply

edit

{{editprotected}} Please replace it with sandbox. Current version unintentionally links to wrong namespace. --fryed-peach (talk) 16:11, 24 November 2008 (UTC)Reply

Done. --- RockMFR 22:49, 27 November 2008 (UTC)Reply

width is typically malformed

edit

{{Editprotected}}

Please replace;

width="{{{width|}}}"

with;

{{#if:{{{width|}}}|width="{{{width}}}"}}
  • The former is resulting width="" for most cases where no width is specified; it is improper to not have a value between the quotes.
  • HTML Tidy says '<td> attribute "width" lacks value'

Cheers, Jack Merridew 09:58, 11 January 2009 (UTC)Reply

  Done — {{Nihiltres|talk|log}} 18:11, 12 January 2009 (UTC)Reply

Thanks. Cheers, Jack Merridew 06:20, 13 January 2009 (UTC)Reply

more

{{Editprotected}}
The refinement Nihiltres made to my above request should also be made for the gap argument; i.e.

replace;

{{#if: {{{gap|}}} | style="padding-left:{{{gap}}};" }}

with;

{{#if: {{{gap<includeonly>|</includeonly>}}} | style="padding-left: {{{gap}}};" }}
Cheers, Jack Merridew 06:20, 13 January 2009 (UTC)Reply
  Done — {{Nihiltres|talk|log}} 23:35, 13 January 2009 (UTC)Reply

Code displaying on page

edit

The code:

| width="{{{width}}}" align="left" valign="top" style="padding-left:{{{gap}}};"|

is displaying on the page.

Also, is

<p></p>

necessary? Xin-Xin W. (talk) 18:47, 6 December 2012 (UTC)Reply

Col-break error

edit

I tried to use that template at Belgian Government in Exile#Changes, but it shows an error. Can anyone tell why it doesn't seem to work? —Brigade Piron (talk) 14:02, 22 July 2013 (UTC)Reply

You mean this edit, right? I found the problem: {{Colbegin}} for some reason redirects to {{Div col}} rather than the intended template, {{Col-begin}}, and {{Colend}} redirects to {{Div col end}} rather than {{Col-end}}… rather confusing indeed. You simply used a {{Col-break}} in a column where it could not be used.
However, the edit you intended is unnecessary anyway, since the {{Div col}} template automatically breaks columns for which it is used. Right now, for instance, the list on Belgian Government in Exile is divided neatly into two columns. Why do you want to break it differently? — |J~Pæst|00:01, 24 July 2013 (UTC)Reply
Thanks for that! I just wanted to break the column neatly at a certain entry, but I think that your right and that it might be preferable to leave it as it is. Thank you for your help anyway, I'll remember it for future use!Brigade Piron (talk) 08:34, 24 July 2013 (UTC)Reply

Is there any CSS replacement for this?

edit

Hi, I'm looking for a CSS solution that doesn't depend on table. Bennylin (talk) 10:08, 5 January 2015 (UTC)Reply

@Bennylin: Try {{div col}} and {{div col end}}, these may be placed around a bulleted list, see Wikipedia:Meetup/UK#London for a working demonstration. --Redrose64 (talk) 13:45, 5 January 2015 (UTC)Reply

Template-protected edit request on 17 June 2017

edit

When the template is used it breaks the column but the following text is displayed on the screen [Quote] | style="text-align: left; vertical-align: top; " | [/Quote] I think there is an unwanted line in the beginning.

Please edit as I need to use this template often. UKSharma3 — Preceding unsigned comment added by Uksharma3 (talkcontribs) 01:25, 17 June 2017 (UTC)Reply

@Uksharma3:   Not done for now: It sounds as if you are not using it correctly. Which page does this happen on?
Also, your signature contains no links: please fix i in accordance with WP:SIGLINK. --Redrose64 🌹 (talk) 09:27, 17 June 2017 (UTC)Reply
(1) Now I have used another template {{Col-2}} to divide the columns.
(2) Thanks for the warning about my signature. Now I have modified it to link to my page.--UKSharma3 talk 09:58, 17 June 2017 (UTC)Reply

Template-protected edit request on 1 August 2018

edit

Current code contains a <p></p> Consturction which is considered badly formed by the parser in a number of circumstances.

It should be replaced with:

<!-- Blank line for table handling. -->
|  style="{{#if:{{{width|}}}|width: {{{width}}}; }}text-align: {{{align|left}}}; vertical-align: {{{valign|top}}}; {{#if: {{{gap|}}}|padding-left: {{{gap}}};}} {{{style|}}}" |<noinclude>
{{Documentation}}
</noinclude>

ShakespeareFan00 (talk) 10:18, 1 August 2018 (UTC)Reply

  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. I tried this change on Arbor Day and it added some unnecessary and inappropriate spaces. Consider the possibility of replacing <p></p> with <span></span> instead—and try it out first. StevenJ81 (talk) 16:54, 1 August 2018 (UTC)Reply
The spaces on that article are due to the {{Portal}} template. If that is wrapped as the third column it all works very nicely.. ShakespeareFan00 (talk) 20:53, 1 August 2018 (UTC)Reply
In any case using a blank paragraph in a place where there shouldn't be one is bad document structuring. ShakespeareFan00 (talk) 21:06, 1 August 2018 (UTC)Reply
No argument, @ShakespeareFan00. Still, in the short run, we're looking to create a fix that is not going to change the appearance of a lot of pages right away. Even if pages were, say, less-than-ideally written in the first place because the template itself was less-than-ideally written, we still have a bunch of pages that are going to get messed up if this gets changed in the way you have suggested. And it's the job of neither one of us to go fix all the pages, unless you're volunteering. (I'm not.)
So let me ask again: in the short run, can you live with converting <p></p> to <span></span>? (And does that work more or less universally?) I would suggest that using an empty span element is better than using a blank paragraph element, even if in and of itself it's not the ideal approach. StevenJ81 (talk) 21:15, 1 August 2018 (UTC)Reply
There shouldn't be ANYTHING there at all, If Mediawiki had PROPER table syntax that didn't need hacks to ensure the parser see a SOL context...ShakespeareFan00 (talk) 21:34, 1 August 2018 (UTC)Reply
I'm also not sure why {{Col-begin}} is generating different things depending on which {{col-break}} is used..ShakespeareFan00 (talk) 21:34, 1 August 2018 (UTC)Reply
Using a <span></span> leads to a justified warning about 'Misnesting' given that you are putting it somewhere it cannot logicvally be put in HTML5.
I would suggest the issue with the 'mis-spacing' may have something to do with the {{Portal}} template, not being correctly floated as far as I can tell

ShakespeareFan00 (talk) 21:38, 1 August 2018 (UTC)Reply

Also something else is wrong given that moving {{col-break}} to a new line also causes the mis-spacing you mention. ShakespeareFan00 (talk) 22:00, 1 August 2018 (UTC)Reply
Based on sandbox testing, it looks like we don't need a SOL hack at all anymore due to changes in the MediaWiki engine. If we can work out any spacing issues on pages, we can push through with removing the tags completely. TheDragonFire (talk) 13:52, 4 August 2018 (UTC)Reply
TheDragonFire, I agree, but there is one particular case that generates a different result. namely, when there is no newline between the {{col-begin}} and the {{col-break}}. see the testscases. the fact that that works at all is a total hack, and I don't think this should stop us from breaking the hack. you can get the same result without the hack using |width=auto in {{col-begin}}. although a simple insource search shows over 2800 uses of the hack in article space. Frietjes (talk) 23:16, 5 August 2018 (UTC)Reply

A potential problem was found -

{{Col-begin}}
{{Col-break}}
* [[Agricultural biotechnology]]
{{Col-break}}
* [[Weed]] science
{{Col-end}}
<div>
<table class="multicol" role="presentation" style="border-collapse: collapse; padding: 0; border: 0; background:transparent; width:100%;">
<p></p>
<tr>
<td style="text-align: left; vertical-align: top;">
<ul><li><a href="/wiki/Agricultural_biotechnology" title="Agricultural biotechnology">Agricultural biotechnology</a></li></ul>
<p></p>
</td>
<td style="text-align: left; vertical-align: top;">
<ul><li><a href="/wiki/Weed" title="Weed">Weed</a> science</li></ul>
<p></p>
</td></tr></table></div>

It's putting a <p></p> in a "fostered" context which is malformed, P cannot be placed outside a TD and this template doesn't generate it properly in the instance shown. ShakespeareFan00 (talk) 00:00, 6 August 2018 (UTC)Reply

If Mediawiki had sane non-overloaded and CONSISTENT and DOCUMENTED whitespace handling rules... ShakespeareFan00 (talk) 00:03, 6 August 2018 (UTC)Reply
right, this is why we are discussing eliminating the P tags. Frietjes (talk) 13:02, 6 August 2018 (UTC)Reply
checking the testcases, it looks like Redrose64 has a viable solution with this change. I suggest we implement the change if there are no serious objections. it saves us from having to fix ca. 2800 articles which use the "single line" syntax. Frietjes (talk) 20:39, 7 August 2018 (UTC)Reply
now implemented. Frietjes (talk) 12:43, 8 August 2018 (UTC)Reply
For some reason, this workaround still sometimes causes fostered content Linter errors, in e.g. 10-Piece handicap. It does not cause them all the time, which is strange. I have replaced the space character with a <noinclude /> tag, which should render an empty space in the expanded wikitext and should not affect the rendered page. If it does affect a rendered page, please add that case to the testcases page for troubleshooting. Whitespace handling is strange. – Jonesey95 (talk) 17:08, 8 September 2021 (UTC)Reply
Jonesey95, the entire point was to support the legacy feature that
{{col-begin}}{{col-break}}
Column1
{{col-break}}
Column2
{{col-end}}
would not render at 100% width but
{{col-begin}}
{{col-break}}
Column1
{{col-break}}
Column2
{{col-end}}
would render at 100% width. however, I think that feature was broken some time ago either by changes to the backend software, or one of the other templates so the only easy solution is to just force people to use |width=auto in {{col-begin}}. Frietjes (talk) 18:22, 8 September 2021 (UTC)Reply
That doesn't sound like a real feature to me, but I have seen other templates that are not happy unless they are on a new line in the wikitext. I played with the testcases before deploying, and I could not see a difference, so I think you may be right that something else may have disabled that legacy quirk. If there is a test case that shows a difference, please add it to the testcases page. I added a case with |width=auto in {{col-begin}}, but I do not see a difference. I'm not attached to this particular workaround, but it does appear to solve the Linter fostered content problems. – Jonesey95 (talk) 21:07, 8 September 2021 (UTC)Reply

Col errors Sept 2021

edit

I used that template but it didn't work, did anyone else notice those errors. Hopefully these errors can be resolved. MACCWIKI (talk) 01:54, 10 September 2021 (UTC)Reply

@MaccWiki: Where are you seeing problems? --Redrose64 🌹 (talk) 08:18, 10 September 2021 (UTC)Reply

{{Row-break}}

edit

FYI Template:Row-break (edit | talk | history | links | watch | logs) has been nominated for deletion. That is a companion template to this one -- 64.229.90.172 (talk) 22:20, 27 May 2023 (UTC)Reply