User blog:Marphimon/Introduction to DynamicPageLists On Fandom

Caution! This is very coding heavy advice, using a lot of technical terms that you encounter in coding. If you have not understood things such as parser functions or wikitext in general yet, please learn more about these functions before you proceed.

DynamicPageLists is an extension that can optionally be enabled on Fandom by Fandom Staff. Typically, this is a generator similar to how one would query datasets in say, SQL. Except here, you can directly query wiki articles and their associated data, to aggregate them in a different way, or combine them into enhancing your articles dynamically and automatically.

To DPL or Not to DPL - Why & When
As mentioned before, DPL is great to help with aggregating things, or including new content that is getting created after the DPL query has been published already.

For a basic idea of what DPL can do, you can take a look at the mechanism that our Community Central request page for interlanguage links is using - DPL allows us to see all new requests (=mediawiki articles) that are created by users with a certain category attached to them in a custom list format. Click here to see the source code.

A good use case is if you want to use DPL to automate content maintenance and create pages that combine modular information.

Let's say you are on a gaming wiki, and you want to combine all descriptions of a certain armor set on a single page, but you don't want to copy paste from each article to avoid having to keep both up to date. Or you are on an anime/tv wiki where you have episode pages with summaries that you want to combine into a season summary page.

DPL can help you automate this, by taking a specific section out of a different article and loading it as if it was written on the page you are using DPL on.

You can see a highly customized example live in action here: https://myheroacademia.fandom.com/wiki/Episodes?action=edit

If you do this though, be considerate about what and how much information you query or intend to render. As the series keeps going, this can start to slow down page loading times and this will have a negative effect on your SEO, so consider a separate overview for each collection purpose. Also, always make sure a new page includes some original text, e.g. an introduction, when you do!

Testing And Serverload Considerations
When trying new things with DPL, always set a low limit of 2-5, using the  parameter (because it will count until the limit). This allows you to test your changes much faster because less data has to be compiled for rendering as well as prevents you from unintentionally querying thousands of pages at once.

Especially if you go deep into inclusion of article content using the  parameter, it is strongly advised to test in a limited capacity first.

Do Not Generate Navboxes With DPL
It might be tempting to create a navbox with all the articles in a given category. However, this is a bad idea for multiple reasons.

To start, too many links on a page are bad for your wiki's SEO, which will result in less views over time. Depending on how many articles you have in the category, which might be a little today but a lot tomorrow, this can also create usability and accessibility issues. Remember that you always want to design with accessibility in mind.

Instead, make sure you only include the most important links in a navbox and ensure the pages you point to are a good place for users to continue exploring. If you still want to send them to an aggregated list, consider linking to a category directly in your navbox.

Ready to Try? Simple Queries to Understand and Explore DPL
Two ways to call DPL:  and. Depending on complexity you might choose one over the other, but we will focus on the parser function version.

First identify what you want to know, e.g. "I want to know what blogs are currently categorized as Advice Pro". You will need to know the type of article you want to get (blog namespace) and how you want to filter it (category).

becomes

 Say, you want to display the 2 latest blog posts on your main page. There's the bloglist function to do that (please use that one instead), but just for showcasing how DPL work, we'll replicate the idea.

becomes

It displays a basic list with the content you wanted.

But like, you just wanted news to display, not a user fanfiction, so how to do that? Simple - you add a second category to the list to say, "I want it to be categorized as a blog AND as news". Or in our case, Product updates.

becomes

Crafty, isn't it?

Now that we have explored how to say AND in DPL, how about we explore how to say OR? For example, you want either news OR announcements to display, or in our case, DEI blogs OR other program updates.

becomes

But wait, what was that weird ¦ symbol just now? That is where the different methods of using the tag or the parser function come into play. To say OR, you need to use a vertical slash | - but because in a parser function this is used to indicate a new parameter, you can't do that. This is why you are using something called a "broken pipe" - ¦ - which serves the exact same purpose but isn't indicating a new parameter to the parser function.

This is just a very general overlook at DPL - there is so much more you can explore and dive into in our help documentation around DPL: Help:DPL3/Parameters:_Criteria_for_page_selection

We hope that this advice gives you a first idea of how you could use DPL to enhance your wiki, the general idea of how it works, and where to start from!

de:Benutzer_Blog:Nekky-chan/Vorstellung_von_DynamicPageLists_auf_Fandom