Template talk:Trains portal/News image and Wikinews

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconTrains: Portal Template‑class
WikiProject iconThis template is within the scope of WikiProject Trains, an attempt to build a comprehensive and detailed guide to rail transport on Wikipedia. If you would like to participate, you can visit the project page, where you can join the project and/or contribute to the discussion. See also: WikiProject Trains to do list and the Trains Portal.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
Associated projects or task forces:
Taskforce icon
This template is supported by the Portal task force.

Usage[edit]

This template is used in the "In the news..." section of Portal:Trains. It takes four parameters:

  1. The filename of an image to use
  2. The alternate text of the image
  3. The title of the associated WikeNews article
  4. An empty parameter to suppress the border
Transrapid train
Transrapid train

Logo of WikiNews
Logo of WikiNews
WikiNews:
read more...

For example,

{{Trains portal/News image and Wikinews|Transrapid.jpg|Transrapid train|Transrapid collision in Germany kills 23|}}

produces the image and WikiNews link shown at right. Like {{Trains portal/News image}}, to produce a border around the logo image, omit the final pipe (|) character.

See also[edit]

CSS help needed[edit]

Okay, this problem is officially difficult now. What I'd like to do is add word wrapping to the template so that Wikinews headlines wrap at 80px. The problem is that when I try adding word wrapping to the template, it doesn't quite work when the template is used within a bulleted list (as normally happens in the News section of Portal:Trains). The wrapped text is all aligned against the right margin of the list rather than floating under the Wikinews logo where it belongs. I've tried several methods to get it to work (as evidenced on User:Slambo/Template test and the samples on User:Slambo/Template usage test), but haven't gotten it yet. Any css gurus want to try? AdThanksVance. Slambo (Speak) 21:14, 22 December 2005 (UTC)[reply]

Doing the following in the template:

{| border="0" style="float:right; width:80px; margin-left:5px;"
 | {{{4|<span style="display:table-cell; border-collapse:collapse; border: solid 1px #BBBBBB;">}}}
   [[Image:{{{1}}}|none|75px|{{{2}}}]]{{{4|</span>}}}
 |-
 | [[Image:Wikinews-logo.png|none|75px|Logo of WikiNews]]
 |-
 | <small>'''''WikiNews:'''''</small>
 |-
 | <small>''[[Wikinews:{{{3}}}|{{{3}}}]]''</small>
 |}

... almost does it. The text and images are positioned correctly, but it stomps on the bullet if it's used within a bulleted list (as can be seen on my test page). Slambo (Speak) 21:46, 23 December 2005 (UTC)[reply]