--=REKLAMA=--

Szablon

Wersja

Z Joomla!WikiPL


[ przeglądaj][edytuj][historia] Szablon:Wersja - dokumentacja

Zastosowanie

Umieszcza w górnej części strony pasek z komunikatem informującym, do której wersji Joomla odnosi się dany artykuł. Może zawierać link do alternatywnej wersji artykułu.

Inne wersje szablonu:

Przeczytaj Parametry, aby zobaczyć listę wszystkich dostępnych parametrów. Ten szablon korzysta również z rozszerzenia Arrays, które pozwala oddzielać wiele zmiennych przecinkami. Jeśli masz problemy ze stosowaniem albo wystąpią jakiekolwiek błędy, proszę umieścić wiadomość na stronie dyskusji tego szablonu lub stronie dyskusji autora.

Przykłady

Użyj poniższego kodu, aby umieścić w górnej części artykułu uwagę o wersji.

{{wersja|2.5}}
{{wersja|1.6,1.7,2.5}}
{{wersja|platforma=11.1,11.2}}
{{wersja|1.6,1.7,2.5|platforma=11.1,11.2}}
{{wersja|1.6,1.7,2.5|alt=1.5|altlink=:Kategoria:Joomla! 1.5|alttitle=Kategoria Joomla! 1.5}}


Parametry

Parametr Opis parametru Przykład wym./opc.
{{{1}}} Wersja(e) CMS Joomla! 2.5 lub 1.6,1.7,2.5 (an array) wymagane albo musisz użyć platform=
platforma= Wersja(e) Platformy Joomla! platforma=11.1 lub platforma=11.2,11.3 wymagane lub musisz użyć {{{1}}}
alt= Alternatywna wersja, może być CMS lub Platforma alt=1.5, alt=1.7,2.5 (jakaś tablica) albo alt=11.2,11.3 opcjonalne (musisz też użyć altlink)
altlink= Alternatywna wersja - łącze do artykułu altlink=Joomla! 1.5 opcjonalne (musisz też użyć alt)
alttitle= Alternatywna wersja - tekst łącza do artykułu alttitle=musisz przeczytać! opcjonalne


Znane problemy

  • Gdy używasz |alt=(wersja#), należy użyć |altlink=(link). The template checks for another page link, before the alternate version icons and the notice is included.
  • Odnośniki do kategorii, należy użyć symbolu : (dwukropek), aby stworzyć link do strony kategorii. Taki link będzie wyświetlony jako :Kategoria:Artykuł. Zalecane jest korzystanie ze zmiennej alttitle=, alttitle=Kategoria;Ten artykul będzie maskowac rzeczywisty link.

Materiały

  • This is the wiki markup used; *NOTE* - comments, line breaks and whitespace must be removed.
   <!--Main container-->
<div style="position:relative; left:0px; top:-10px; width:100%; margin-bottom:-20px;" class="metadata" id="version">
   <!--Inside containter which holds the actual content of the template-->
<div style="width:auto; border:1px solid #84ABD4; padding:1px 3px 1px 3px; background-color:#B7E2FB;
 text-align:center; font-size:1.0em; -moz-border-radius:5px; border-radius:5px; margin-bottom:20px;"> 
   
   <!--Create the array for the JVer icon template calls from variable(anonymous 1),
       it is ok if it doesn't have the anonymous variable, platform= is the backup check,
       but one of them must contain a value-->
{{#arraydefine:Vicon|{{{1|}}}}}
   <!-- If variable(anonymous 1) contains values, they are the CMS version numbers-->
{{#if:{{{1|}}}|
   <!-- Variable 1 has value, process this--><!-- Start of 1st IF true-->
     <!-- First, check for altlink(Alternate Link) if yes, print stop_hand icon, no altlink then skip -->
{{#if:{{{altlink|}}}|[[Image:Stop_hand_nuvola.svg.png‎|26px]] |}}
   <!-- Start printing the notice -->
This article is for Joomla! CMS Version(s) 
   <!-- Call the array and print the JVer icons, CMS Versions are default, Platform is backup-->
{{#arrayprint:Vicon| |@@@@|{{JVer|@@@@}} }}
   <!-- Call the Platform versions if needed-->
{{#if:{{{platform|}}}|
   <!-- Define the Array for Platform for use in the Extras section-->
{{#arraydefine:Picon|{{{platform|}}}}}|}}| <!-- End of first IF - proceeds to Extras section -->

   <!-- If the anonymous(Variable 1) was missing... Print the Platform message instead (the 2nd IF)-->
{{#if:{{{platform|}}}|
   <!-- Create the array for this alternative Print-->
{{#arraydefine:Picon|{{{platform|}}}}}
   <!-- Checking for altlink, print the icon stop_hand-->
{{#if:{{{altlink|}}}|[[Image:Stop_hand_nuvola.svg.png‎|26px]] |}}
   <!-- Start printing the Platform notice -->
This article is for Joomla! Platform Version(s) 
   <!-- Print the Array for icons, then reset it-->
{{#arrayprint:Picon| |@@@@|{{JVer|@@@@}} }}{{#arrayreset:Picon}}| <!--End of 2nd IF-->

   <!-- Something is missing, IF 1 fail, IF 2 fail, means(anonymous 1 or platform=)
        no value, show an error-->
'''TEMPLATE ERROR - Version(s) Needed. Please Check Usage.'''}}}}

   <!--Now the Extras, print a CMS and Joomla Platforms message if relevant,
      check for the Alternate Versions and link to the alternate title-->

   <!-- Check if there is an Array called Picon with a value-->
{{#if:{{#arraysize:Picon}}|
   <!-- Yes, now print it and the Icons otherwise, skip it completely-->
 and Joomla! Platform Version(s) {{#arrayprint:Picon| |@@@@|{{JVer|@@@@}}}}{{#arrayreset:Picon}}|}}
   <!-- Check for an altlink value-->
{{#if:{{{altlink|}}}|
   <!-- Define the alt version Array, note, altlink must have a value or Array creation is skipped-->
{{#arraydefine:Aicon|{{{alt|}}}}}
   <!-- Put it all together and print it-->
  '''→''' For a {{#arrayprint:Aicon| |@@@@|{{JVer|@@@@}} }} article, see:- 
   <!-- Create the link from altlink and alttitle-->
'''[[{{{altlink|}}}|{{{alttitle|{{{altlink}}}}}}]]'''
   <!-- Clear the Array-->
{{#arrayreset:Aicon}}|}}
   <!-- Close the div containers-->
</div></div>