×
Namespaces

Variants
Actions
(Difference between revisions)

Template:LanguageCategoryPageProxy

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
(Hamishwillee - Test with new tabber based interface)
hamishwillee (Talk | contribs)
m (Hamishwillee - Update so that there are less tabs rendered by default on English, and that language specific tabs not calculated on other pages. Improved DPL)
Line 32: Line 32:
 
** ''notplatform-windowsphone=true'' : If platforms have been enabled, this disables the portal for Windows Phone - used if WP portal already exists
 
** ''notplatform-windowsphone=true'' : If platforms have been enabled, this disables the portal for Windows Phone - used if WP portal already exists
 
* ''addhighlightnewest=true'' : Adds a list containing the newest articles
 
* ''addhighlightnewest=true'' : Adds a list containing the newest articles
 +
 +
* ''addtab-arabic'': Forces DPL to run to create an arabic tab if addtab-arabic is defined
 +
* ''arab'': Forces DPL to run to create a bahasa indonesia tab if value is defined
  
 
== Appearance == <!-- Remove or rename section based on what the template does -->
 
== Appearance == <!-- Remove or rename section based on what the template does -->
Line 311: Line 314:
 
next tabber - Portuguese  
 
next tabber - Portuguese  
  
-->{{#dpl:
+
Executes if language is either English or specified language
 +
-->{{#if:
 +
{{#if: {{{language|}}}|<!-- empty if not English -->|hasValueIfEnglish}}
 +
{{#ifeq: {{{language|}}}|Lang-Portuguese|hasValueIfLanguageMatch|<!-- empty not defined or not match -->}}
 +
|<!-- execute - is English or matches language--> {{#dpl:
 
namespace={{{namespace|}}}|
 
namespace={{{namespace|}}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
Line 370: Line 377:
 
|resultsfooter=
 
|resultsfooter=
 
|mode=category
 
|mode=category
}}<!--
+
}}|<!-- don't execute - language specified but not the right one-->}}<!--
  
 
next tabber - Chinese  
 
next tabber - Chinese  
  
-->{{#dpl:
+
Executes if language is either English or specified language
 +
-->{{#if:
 +
{{#if: {{{language|}}}|<!-- empty if not English -->|hasValueIfEnglish}}
 +
{{#ifeq: {{{language|}}}|Lang-Chinese|hasValueIfLanguageMatch|<!-- empty not defined or not match -->}}
 +
|<!-- execute - is English or matches language--> {{#dpl:
 
namespace={{{namespace|}}}|
 
namespace={{{namespace|}}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
Line 433: Line 444:
 
|resultsfooter=
 
|resultsfooter=
 
|mode=category
 
|mode=category
}}<!--  
+
}}|<!-- don't execute - language specified but not the right one-->}}<!--  
  
 
next tabber - Русский (Russian)  
 
next tabber - Русский (Russian)  
  
-->{{#dpl:
+
Executes if language is either English or specified language
 +
-->{{#if:
 +
{{#if: {{{language|}}}|<!-- empty if not English -->|hasValueIfEnglish}}
 +
{{#ifeq: {{{language|}}}|Lang-Russian|hasValueIfLanguageMatch|<!-- empty not defined or not match -->}}
 +
|<!-- execute - is English or matches language-->{{#dpl:
 
namespace={{{namespace|}}}|
 
namespace={{{namespace|}}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
Line 496: Line 511:
 
|resultsfooter=
 
|resultsfooter=
 
|mode=category
 
|mode=category
}}<!--
+
}}|<!-- don't execute - language specified but not the right one-->}}<!--
  
 
next tabber - Bahasa Indonesia  
 
next tabber - Bahasa Indonesia  
  
-->{{#dpl:
+
Executes if language is specified language or if addtab-bahasa-indonesia is defined
 +
--> {{#if:
 +
{{#if: {{{addtab-bahasa-indonesia|}}}|hasValueIfDefined|<!-- empty if not defined-->}}
 +
{{#ifeq: {{{language|}}}|Lang-Bahasa Indonesia|hasValueIfLanguageMatch|<!-- empty not defined or not match -->}}
 +
|<!-- execute - is Lang-Bahasa Indonesia or we're forcing it --> {{#dpl:
 
namespace={{{namespace|}}}|
 
namespace={{{namespace|}}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
Line 559: Line 578:
 
|resultsfooter=
 
|resultsfooter=
 
|mode=category
 
|mode=category
}}<!--
+
}}  |<!-- don't execute - not this language specified or we're not forcing it -->}}<!--
  
 
next tabber - Español (Spanish)  
 
next tabber - Español (Spanish)  
  
-->{{#dpl:
+
Executes if language is specified language
 +
--> {{#ifeq: {{{language|}}}|Lang-Spanish| {{#dpl:
 
namespace={{{namespace|}}}|
 
namespace={{{namespace|}}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
Line 622: Line 642:
 
|resultsfooter=
 
|resultsfooter=
 
|mode=category
 
|mode=category
}}
+
}} |<!-- empty not match -->}}<!--
  
<!--next tabber - العربية (Arabic) -->
+
next tabber - العربية (Arabic)  
{{#dpl:
+
 
 +
Executes if language is specified language or if addtab-arabic is defined
 +
--> {{#if:
 +
{{#if: {{{addtab-arabic|}}}|hasValueIfDefined|<!-- empty if not defined-->}}
 +
{{#ifeq: {{{language|}}}|Lang-Arabic|hasValueIfLanguageMatch|<!-- empty not defined or not match -->}}
 +
|<!-- execute - is arabic or we're forcing it --> {{#dpl:
 
namespace={{{namespace|}}}|
 
namespace={{{namespace|}}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
Line 684: Line 709:
 
|resultsfooter=
 
|resultsfooter=
 
|mode=category
 
|mode=category
}} <!--
+
}} |<!-- don't execute - wrong language or we're not forcing it -->}}<!--
 +
 
 +
next tabber - 日本語Wiki (Japanese)
 +
 
 +
Executes if language is specified language
 +
--> {{#ifeq: {{{language|}}}|Lang-Japanese|
 +
{{#dpl:
 +
namespace={{{namespace|}}}|
 +
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 +
{{#ifeq: {{{platformfilter|}}}|Java ME|{{platformCategoriesJavaME}}|}}|
 +
{{#if: {{{10|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}¦{{{6}}}¦{{{7}}}¦{{{8}}}¦{{{9}}}¦{{{10}}}|
 +
{{#if: {{{9|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}¦{{{6}}}¦{{{7}}}¦{{{8}}}¦{{{9}}}|
 +
{{#if: {{{8|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}¦{{{6}}}¦{{{7}}}¦{{{8}}}|
 +
{{#if: {{{7|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}¦{{{6}}}¦{{{7}}}|
 +
{{#if: {{{6|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}¦{{{6}}}|
 +
{{#if: {{{5|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}|
 +
{{#if: {{{4|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}|
 +
{{#if: {{{3|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}|
 +
{{#if: {{{2|}}}|category={{{1}}}¦{{{2}}}|
 +
{{#if: {{{1|}}}|category={{{1}}}|}}
 +
}} }} }} }} }} }} }} }} }}|
 +
{{#if: {{{language|}}}|category={{{language}}}|}}|
 +
category=Lang-Japanese|
 +
{{#if: {{{andcategory|}}}|category={{{andcategory}}}|}}|
 +
{{#if: {{{andcategory2|}}}|category={{{andcategory2}}}|}}|
 +
{{#if: {{{andcategory3|}}}|category={{{andcategory3}}}|}}|
 +
{{#if: {{{andcategory4|}}}|category={{{andcategory4}}}|}}|
 +
{{#if: {{{andcategory5|}}}|category={{{andcategory5}}}|}}|
 +
{{#if: {{{andcategory6|}}}|category={{{andcategory6}}}|}}|
 +
{{#if: {{{andcategory7|}}}|category={{{andcategory7}}}|}}|
 +
{{#if: {{{andcategory8|}}}|category={{{andcategory8}}}|}}|
 +
{{#if: {{{andcategory9|}}}|category={{{andcategory9}}}|}}|
 +
{{#if: {{{andcategory10|}}}|category={{{andcategory10}}}|}}|
 +
{{#if: {{{andcategory11|}}}|category={{{andcategory11}}}|}}|
 +
{{#if: {{{andcategory12|}}}|category={{{andcategory12}}}|}}|
 +
{{#if: {{{notcategory|}}}|notcategory={{{notcategory}}}|}}|
 +
{{#if: {{{notcategory2|}}}|notcategory={{{notcategory2}}}|}}|
 +
{{#if: {{{notcategory3|}}}|notcategory={{{notcategory3}}}|}}|
 +
{{#if: {{{notcategory4|}}}|notcategory={{{notcategory4}}}|}}|
 +
{{#if: {{{notcategory5|}}}|notcategory={{{notcategory5}}}|}}|
 +
{{#if: {{{notcategory6|}}}|notcategory={{{notcategory6}}}|}}|
 +
{{#if: {{{notcategory7|}}}|notcategory={{{notcategory7}}}|}}|
 +
{{#if: {{{notcategory8|}}}|notcategory={{{notcategory8}}}|}}|
 +
{{#if: {{{notcategory9|}}}|notcategory={{{notcategory9}}}|}}|
 +
{{#if: {{{notcategory10|}}}|notcategory={{{notcategory10}}}|}}|
 +
{{#if: {{{notcategory11|}}}|notcategory={{{notcategory11}}}|}}|
 +
{{#if: {{{notcategory12|}}}|notcategory={{{notcategory12}}}|}}|
 +
{{#if: {{{notcategory13|}}}|notcategory={{{notcategory13}}}|}}|
 +
{{#if: {{{notcategory14|}}}|notcategory={{{notcategory14}}}|}}|
 +
{{#if: {{{notcategory15|}}}|notcategory={{{notcategory15}}}|}}|
 +
{{#if: {{{notcategory16|}}}|notcategory={{{notcategory16}}}|}}|
 +
{{#if: {{{notcategory17|}}}|notcategory={{{notcategory17}}}|}}|
 +
{{#if: {{{notcategory18|}}}|notcategory={{{notcategory18}}}|}}|
 +
{{#if: {{{notcategory19|}}}|notcategory={{{notcategory19}}}|}}|
 +
{{#if: {{{notcategory20|}}}|notcategory={{{notcategory20}}}|}}|
 +
{{#ifeq: {{{showdrafts|}}}|true||notcategory=Draft}}|
 +
{{#ifeq: {{{showhidden|}}}|true||notcategory=FNWiki}}|
 +
{{#ifeq: {{{showhidden|}}}|true||notcategory=Advert}}|
 +
{{#ifeq: {{{showhidden|}}}|true||notcategory=Advertising}}|
 +
{{#ifeq: {{{showhidden|}}}|true||notcategory=Archived}}|
 +
{{#if: {{{uses|}}}|uses={{{uses}}}|}}|
 +
{{#if: {{{notuses|}}}|notuses={{{notuses}}}|}}|
 +
|resultsheader= {{!}}-{{!}} 日本語 (%PAGES%) {{=}}
 +
|resultsfooter=
 +
|mode=category
 +
}} |<!-- empty not match -->}}<!--
  
 
next tab - Other  
 
next tab - Other  
  
-->{{#dpl:
+
-->  {{#if: {{{language|}}}|<!-- empty if not English -->|<!-- execute as is English --> {{#dpl:
 
namespace={{{namespace|}}}|
 
namespace={{{namespace|}}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
 
{{#ifeq: {{{platformfilter|}}}|Windows Phone|{{platformCategoriesWindowsPhone}}|}}|
Line 708: Line 798:
 
notcategory=Lang-Russian|
 
notcategory=Lang-Russian|
 
notcategory=Lang-Chinese|
 
notcategory=Lang-Chinese|
notcategory=Lang-Bahasa Indonesia|
+
{{#if: {{{addtab-arabic|}}}|notcategory=Lang-Arabic|<!-- empty if not defined-->}}|
notcategory=Lang-Spanish|
+
{{#if: {{{addtab-bahasa-indonesia|}}}|notcategory=Lang-Bahasa Indonesia|<!-- empty if not defined-->}}|
notcategory=Lang-Arabic|
+
 
{{#if: {{{andcategory|}}}|category={{{andcategory}}}|}}|  
 
{{#if: {{{andcategory|}}}|category={{{andcategory}}}|}}|  
 
{{#if: {{{andcategory2|}}}|category={{{andcategory2}}}|}}|  
 
{{#if: {{{andcategory2|}}}|category={{{andcategory2}}}|}}|  
Line 753: Line 842:
 
|resultsfooter=
 
|resultsfooter=
 
|mode=category
 
|mode=category
}}<!--  
+
}}<!-- end -execute as isEnglish -->}}<!--  
  
 
By Platforms tab - only displayed if "addplatforms=true"
 
By Platforms tab - only displayed if "addplatforms=true"

Revision as of 08:04, 18 October 2013

This template creates a "pseudo" category page. It is intended to allow us to create category pages for other languages, without having to use real non-English category names.

Internal use only.

Underconstruction.pngUnder Construction: This article is under construction and it may have outstanding issues. If you have any comments please use the comments tab.


Usage

{{LanguageCategoryPageProxy|language=XXX|}}

The parameters are:

  • Un named parameters: categories to display on the page - e.g. Symbian C++. Multiple categories are also possible
  • language: language code for articles to display (e.g. Lang-Portuguese)
  • platformfilter: Filters topics on the categories associated with the platform - values are:-Windows Phone, Java ME
  • count: (optional) defines number of items to display in the recently edited and most viewed lists up the top
  • andcategory: (andcategory2 ... 12)
  • notcategory: (notcategory2... 12)
  • showhidden=true: If true, articles in categories Archived, FNWiki and Advertising are shown (hidden by default)
  • uses: Specify the templates that must be in articles in the list .Note that to specify multiple templates use the half pipe - e.g.
uses=Template:KBKI ¦ Template:KBTS ¦ Template:KBCS
  • notuses: Specify the templates that must not be in articles in the list .Note that to specify multiple templates use the half pipe - e.g.
notuses=Template:KBKI ¦ Template:KBTS ¦ Template:KBCS
  • listportals=true: If defined, lists all articles that have title prefix "Portals:" in the current language
  • shrinkleft=true: If defined, makes the first lists shrink left rather than display full width. This then works better with a right aligned lists. May be used in conjunction with listed portals.
  • showbycategories=true : If defined, lists all articles with categories. Usual for "main" category page.
  • notheadlines=true : Hides the headline section (and DPL is not executed) - recent edits, most viewed, newest. Note, these would also be hidden if empty
  • addplatforms=true : Adds a section displaying the topics in the main platforms (Windows Phone, Nokia Asha, Symbian Meego).
    • notplatform-asha=true : If platforms have been enabled, this disables the portal for Nokia Asha - used if Asha portal already exists and has been displayed
    • notplatform-symbian=true : If platforms have been enabled, this disables the portal for Symbian - used if Symbian portal already exists and has been displayed
    • notplatform-meego=true : If platforms have been enabled, this disables the portal for MeeGo - used if meego portal already exists
    • notplatform-windowsphone=true : If platforms have been enabled, this disables the portal for Windows Phone - used if WP portal already exists
  • addhighlightnewest=true : Adds a list containing the newest articles
  • addtab-arabic: Forces DPL to run to create an arabic tab if addtab-arabic is defined
  • arab: Forces DPL to run to create a bahasa indonesia tab if value is defined

Appearance

The default template does ...


Articles

2

3

5

A

A cont.

B

B cont.

C

A

B

C

C cont.

D

E

F

G

H

I

J

J cont.

L

M

N

O

P

Q

R

S

T

U

V

W

,

1

2

3

6

A

B

C

D

E

F

G

H

I

J

L

M

N

O

P

Q

Q cont.

R

S

S cont.

T

U

V

W

X

@

A

B

C

D

E

F

G

H

J

M

O

P

Q

R

S

T

U

V

А

Б

В

Г

Д

З

И

К

Л

М

О

О cont.

П

Р

С

Т

У

Ф

Э

A

B

C

D

E

H

I

J

L

M

M cont.

N

O

P

R

S

T

U

W

W cont.

أ

ا

ب

ت

ش

ك

و

A

A cont.

A cont.

249 page views in the last 30 days.