Extension talk:DynamicPageList (Wikimedia)

Jump to: navigation, search

About this board

Edit description

/Archive 01 - /Archive 02

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL (talkcontribs)


I'm trying to show pages in category by alphabetic way, but because the pages names are in Hebrew, the "order=ascending" function doesn't work well. How can I modify it?


Reply to "Order ascending for other language"

"shownav" style ("next 100") navigation bar for list generated by DPL

TitusiMW (talkcontribs)

I would like to use DPL to generate a list of recently changed pages. List can run into 100s of entries. I would like to put a navigation bar like one that is automatically generated by Special:NewPages. I would like to generate links like (Newest) (Newer 100) (Older 100) (Oldest). Clicking on these links, DPL should generate a list of relevant set of pages. Can this be done? Can you show me how? Size of list is not predetermined.

Reply to ""shownav" style ("next 100") navigation bar for list generated by DPL"

Avoiding duplicate pages from dynamic lists

TitusiMW (talkcontribs)

I use duplicator extension to fork existing pages. Is there any way to ensure that only original page and not the duplicated pages gets listed in the dynamic page lists?

Reply to "Avoiding duplicate pages from dynamic lists" (talkcontribs)

It would be great if it was possible to have the ordermethod set at random (specially when the count is set to a small number) so as to present the reader with a different list of articles on each visit.

And I wonder if having several instances of this plugin in a page slow down the performance? I suppose it would depend on the number of categories designated and the number of articles belonging to each category but is there any best-practice available for maximum performance and functionality? (talkcontribs)

ya really

Reply to "Random ordermethod"
Tuxxic (talkcontribs)


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:}} | | 
 category = Category name
 | <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»

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

Reply to "Only display page in current language"
David.Mirth (talkcontribs)

Hello. Is there a possibility to make an intersection of pages that are in one category and their discussion pages are in another? Thanks

Jeblad (talkcontribs)

Take a look at Extension:DynamicPageList (Wikimedia)#category.

He7d3r (talkcontribs)

Looks like that won't help as the categories would need to be in the same page (not one in the article and the other on its talk page).

Jeblad (talkcontribs)

Sorry, didn't read the question! My bad! :D No I don't think you can do that with this extension. Jeblad (talk) 15:13, 6 October 2016 (UTC)

David.Mirth (talkcontribs)

that is the problem... might try it with pywikibot listpages (which would work somehow), but it wouldn't refresh, compared to DPL... We would like on our wiki to make a list of eg. anatomical pages marked as "wrong typography", but those technical categories are given by templates in the discussion pages, not to disturb the reader...

Reply to "Main NS/Discussion" (talkcontribs)

Just had an issue with DynamicPageList on page which was cached by native mediawiki file cache - it simply haven't displayed new pages matched to category filter.

Cache purge helped to get them in list.

Is there any way to solve this issue in native way without manual cache purge?

Reply to "File cache incompatibility"

Selections based on multiple namespaces

Trebiano (talkcontribs)

Is it possible to list selections based on multiple namespaces at the same time ?

For example, how can we apply an OR operator to fetch namespaces=title together with namespace=file ?

Maybe something like the follow ?


category =

ordermethod =categorysortkey

order= ascending

namespace = title OR file


Thanks a lot in advance for any useful tip

Reply to "Selections based on multiple namespaces" (talkcontribs)

I note the example of a 3 column table that has 5 rows and thus uses an offset of 5. http://www.mediawiki.org/wiki/Extension:DynamicPageList_(Wikimedia)#offset

What if I want the table to expand dynamically so it showed all pages (it is a small personal wiki), how would I code that?

This post was posted by, but signed as xxxmicrobexxx.

Theaitetos (talkcontribs)

Afaik, that's not possible, though you could use Extension:DynamicPageList_(third-party), which supports dynamic column settings.

Reply to "Dynamically sized table?"
Khamer~mediawikiwiki (talkcontribs)

I've included the diff of the changes I made to DynamicPageList.php for our wiki, where we wanted to have canonical links that would always point to the newest page in a category (for example.)

This adds a mode, 'redirect', to DynamicPageList.php which will cause PHP to do a header redirect to the first result it gets back. It's a little ghetto, but it works very well and doesn't add any kind of weird overhead.

Index: docroot/extensions/intersection/DynamicPageList.php
--- docroot/extensions/intersection/DynamicPageList.php	(revision 31)
+++ docroot/extensions/intersection/DynamicPageList.php	(revision 32)
@@ -197,6 +197,7 @@
 						$endList = '';
 						$startItem = '';
 						$endItem = '';
+						$redirectMode = false;
 					case 'none':
 						$startList = '';
@@ -204,6 +205,7 @@
 						$startItem = '';
 						$endItem = '<br />';
 						$inlineMode = false;
+						$redirectMode = false;
 					case 'ordered':
 						$startList = '<ol>';
@@ -211,6 +213,7 @@
 						$startItem = '<li>';
 						$endItem = '</li>';
 						$inlineMode = false;
+						$redirectMode = false;
 					case 'inline':
 						// aka comma seperated list
@@ -219,7 +222,16 @@
 						$startItem = '';
 						$endItem = '';
 						$inlineMode = true;
+						$redirectMode = false;
+					case 'redirect':
+						$startList = '';
+						$endList = '';
+						$startItem = '';
+						$endItem = '';
+						$inlineMode = false;
+						$redirectMode = true;
+						break;
 					case 'unordered':
 						$startList = '<ul>';
@@ -227,6 +239,7 @@
 						$startItem = '<li>';
 						$endItem = '</li>';
 						$inlineMode = false;
+						$redirectMode = false;
@@ -627,7 +640,14 @@
 	// end unordered list
-	if ( $useGallery ) {
+	if ( $redirectMode ) {
+		if (count($articleList) > 0) {
+			$uri = preg_replace('/^[^"]*"([^"]*)".*$/', '\1', $articleList[0]);
+			header("Location: $uri");
+		} else {
+			$output = 'No matches!';
+		}
+	} elseif ( $useGallery ) {
 		$gallery->setShowFilename( $galleryFileName );
 		$gallery->setShowBytes( $galleryFileSize );

This post was posted by Khamer~mediawikiwiki, but signed as Khamer.

Reply to "Redirect to another page on the wiki"