(6 intermediate revisions by 2 users not shown)
Riadok 1: Riadok 1:
 
<div class="news-item">
 
<div class="news-item">
 
<div class="box">
 
<div class="box">
<div class="image">{{#if:{{{link-internal|}}}{{{link-external|}}}
+
{{#if:{{{image|}}}
  |[[Image:{{{image-name}}}|link={{{link-external|}}}{{{link-internal|}}}]]
+
  |<div class="image">{{#if:{{{link-internal|}}}{{{link-external|}}}
  |[[{{{image}}}]]}}</div>
+
      |[[{{{image}}}|link={{{link-external|}}}{{{link-internal|}}}]]
 +
      |[[{{{image}}}]]}}</div>}}
 
<div class="news-content">
 
<div class="news-content">
 
{{#if:{{{link-external|}}}{{{link-internal|}}}
 
{{#if:{{{link-external|}}}{{{link-internal|}}}

Aktuálna revízia z 17:33, 16. apríl 2023

{{{title}}}

{{{text}}}

Template:NewsItem

A workhorse template generating news items used by Template:News.

Allows for two styles of usage:

  • In the new style, the file name of the image is given via the parameter image-name, and the news link is given as link-text and target (either link-internal or link-external). The template then not only shows the link below the news item's text, but also links the image, the title, and the “more” arrow to the target.
  • In the old style, the image is provided as full MediaWiki link passed via the parameter image, and the link is given as MW link passed via link. The link is show below the news item's text and repeated inside the “more“ arrow. The title is not a link (unless made so explicitly), the image links to its own page (or the target given explicitly in the link= argument).