Topic on Extension talk:DynamicPageList (Wikimedia)

Only display page in current language

2
Tuxxic (talkcontribs)

Hello,

I am using DynamicPageList with Translate extensions, and I wondered if I have the means to display only pages in the current language in my DPL ?

My pages are displayed like "Page name" - "Page name/en" - "Page name/fr"

Thanks in advance !

Tuxxic (talkcontribs)

OK I managed to get what I wanted by using the other DPL: Extension_talk:DynamicPageList_(third-party)

Then I wrote this, using parser functions I found here: ParserFunctions

Here is the script I used to do this:

{{#ifeq: {{#translation:}} | | 
 <DPL>
 category = Category name
 format=«ul»,<li>[[%TITLE%]]\n</li>,,«/ul»
 </DPL>
 | <DPL>
 category = Category name
 format=«ul»,<li>[[%TITLE%|{{#ifexist: Translations:%TITLE%/Page display title/en <!-- then -->|{{Translations:%TITLE%/Page display title/en}}<!-- else -->|%TITLE%}}]]\n</li>,,«/ul»
 </DPL>
 }}

If someone needs help understanding this chunk of code, please feel free to ask :)

Reply to "Only display page in current language"