Šablóna:NewsItem: Rozdiel medzi revíziami
(Lepsi opis) |
|||
(3 medziľahlé úpravy od rovnakého používateľa.) | |||
Riadok 1: | Riadok 1: | ||
<div class="news-item"> | <div class="news-item"> | ||
<div class="box"> | <div class="box"> | ||
− | <div class="image">{{#if:{{{ | + | {{#if:{{{image|}}} |
− | + | |<div class="image">{{#if:{{{link-internal|}}}{{{link-external|}}} | |
− | + | |[[{{{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|}}} | ||
Riadok 10: | Riadok 11: | ||
}} | }} | ||
{{#if: {{{when|}}} | <div class="time"><time>{{{when}}}</time></div> | {{#if: {{{when|}}} | <div class="time"><time>{{{when}}}</time></div> | ||
− | }}{{{text}}}{{#if:{{{link-external|}}}{{{link-internal|}}}{{{link|}}} | + | }}{{{text|}}}{{#if:{{{link-external|}}}{{{link-internal|}}}{{{link|}}} |
|<div class="news-link">{{#if:{{{link-external|}}}{{{link-internal|}}}|{{Link|external={{{link-external|}}}|internal={{{link-internal|}}}|text={{{link-text|}}}}}|{{{link}}}}}</div>}}</div> | |<div class="news-link">{{#if:{{{link-external|}}}{{{link-internal|}}}|{{Link|external={{{link-external|}}}|internal={{{link-internal|}}}|text={{{link-text|}}}}}|{{{link}}}}}</div>}}</div> | ||
<div class="pipe"></div> | <div class="pipe"></div> |
Aktuálna revízia z 16:51, 24. január 2017
{{{title}}}
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 aslink-text
and target (eitherlink-internal
orlink-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 vialink
. 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 thelink=
argument).