Template talk:PortalButton#Lua
{{WikiProject banner shell|
{{WikiProject Portals}}
}}
Troubleshooting
{{ping|JLJ001}}
I think I've fixed the narrow misbehaviour by wrapping the image syntax in a div with style clear:both. Now the text stays below the image in narrow widths.
Would you be able to take a look at the font-weight problem? I'm at a dead end on that. Cheers Cesdeva (talk)
::Well it now does bold or italics, default is none. This uses a conditional function to add
:::Thanks, that's amazing. Cesdeva (talk) 16:34, 23 May 2018 (UTC)
::::{{ping|JLJ001}} I'm not versed in the slightest on #ifreq, but is that line of markup defined outside of the main div (below the noinclude tags) supposed to be there? Also where on Wikipedia can i learn about that type of markup? Cheers Cesdeva (talk) 00:25, 25 May 2018 (UTC)
:::::{{ping|Cesdeva}} Indeed I seem to have left that there by accident (fixed now). The actual markup is explained in more detail at MW:Help:Extension:ParserFunctions and MW:Help:Magic words. JLJ001 (talk) 09:01, 25 May 2018 (UTC)
Live testing
The template is being tested at Portal:Herbalism/RelatedArticles.
- Issues:
- The templates, when in formation, have a slight affinity to the left margin of the page. Possibly a mediawiki trait.
- Mixing portrait dimensioned images with landscapes requires making adjustments, or just not using portrait images.
- Notes:
Template generally performing well.
Would like to be able to center the inline-block, relative to the mediawiki skin.
- Adding the
|center=yes
parameter will now center it, but also overrides the margin setting if used, and if used may also change other behavior since the element is declared as a block rather than as inline. JLJ001 (talk) 20:50, 25 May 2018 (UTC)
:Cheers, yep, it's now centered but in a block. I was thinking...
- center=yes opens div tag
- center=end closes div tag
That way you could open the centering div in one pb template, and close the centering div in another. Every template in-between would be centered right? Or am I just bonkers? Cesdeva (talk) 21:27, 25 May 2018 (UTC)
:While that is technically possible (and coded), I can't help but feeling some future editor with no knowledge of how this template works would find it a real pain to find why all their elements are mysteriously floating around. A better solution may be to use {{tl|center}} immediately after, which can center numerous elements at once by putting the closing |nocenterend=yes
will omit the closing
|centerendneeded=yes
will add an otherwise unnecessary