#how to post the same information across multiple pages?

69 messages · Page 1 of 1 (latest)

kind cliff
#

I've made a brand new table, only issue is that I want the 'availability' page to read from another template with its name so that editing the availibility of 700+ characters is easier. How can I do that?

Can I also make another page read from the dragon's template or would i be better doing the thing above that I want to do. As information is copy pasted in multiple sections of the wiki for convenient purposes and I want to cut down on how much a user has to edit when posting a new character released. Such as habitat information being on its own page, and on a general 'habitat' page.

kind cliff
#

how to simply information across multiple pages?

#

how to post the same information across multiple pages?

#

Sorry i typo'd the first one

quasi terrace
#

There's many ways you could tackle that actually. Could you list how you'd want to reuse the data?

Because if you just want to have everything on the pages and then display the data in tables on other pages - this can be done with DPL3 (DynamicPageList3) (and would be the easiest option), but it stops you from reusing the data outside of tables.

#

The other option would be using a dedicated extension for this, like Cargo. However this can get complicated and the extensions sometimes get turned off temporarily for safety concerns like recently. I haven't used those myself, so if you decided to go that route, you'd have to ask another user for help with it.

#

The third option is making templates for each dragon (or other page you need data for) with a {{#switch statement and then use that template anywhere you need to reuse the data. It's the simpliest after DPL3 but would take a lot of work if you decided to change the system later or mass-edit

#

The fourth option (the one I use on my wiki) is having a master lua module with all of the data, and a helper lua module with functions to retrieve the data. Then you can use templates to display data for any page on any page (so similar to 3rd method with a few extra steps). It's easier to edit in bulk (if you wanted to change all "Nature Dragon" to "Plant Dragon" for example), and allows to do more crazy things with the data in lua if you like to code, like generating more complicated lists and such that wouldn't be performant/possible in DPL3.

#

Sorry for the text wall, but just wanted to list what's there pupCoffeeMH

kind cliff
#

Its alright!

I want to use data from the infobox itself to a table listing all quests. So you only need to enter data in one place and itll be fixed in the other automatically.

The other way is the infobox to a more simple table format

That and having the availibility of all characters on one template page

quasi terrace
#

What do you mean by "one template page" here?

#

So what you can do with DPL3 is list pages and some of their chosen contents. For example if you had character pages with the same infobox, you could display a table with all characters and their stats if they're in the infobox

#

You couldn't however generate a table of quests if quests themselves are not pages

#

So is that something that would work for you or would you need something different than DPL3?

#

Also you can still use it to list all characters while using a different method for other things as well

kind cliff
#

Uh, i can show a fandom example, im making it a personal project to simplify it

kind cliff
#

on the quests part, each dragon has a 'quest' but it needs to be put in the 'dragonvariable' template and the quest page itself https://dragonvale.fandom.com/wiki/Quests, but currently they are separate and if you edit one you need to edit the other

quasi terrace
#

But in the master data template for habitats

quasi terrace
kind cliff
#

its stored in the same way the 'dragon variable' template is

quasi terrace
#

yes

quasi terrace
#

How many dragons do you have? At around 50-100 it starts being laggy, especially with more info. If you have 150+ I would heavily recommend to do it in lua

#

So to start, how familiar are you with parser functions?

kind cliff
#

around 700, and very little but willing to learn

quasi terrace
#

Hmm that's best to do in lua then, but it'll be harder to learn if you're beginning

kind cliff
#

the issue with the old wiki and dragon variable its hard to edit for new users, which is why i wanted to make it more welcoming for new users or users who want to edit a simple thing

quasi terrace
#

Lua wouldn't be friendlier I believe. Let me post an example from our wiki so it's easier to see

#

That's essentially what doing it in lua would look like

#

You could theoretically have 700 template pages (one for each dragon) that would make it easier since there wouldn't be as much to scroll through

#

so each template would only be a single {{#switch like so:

{{#switch: {{{1}}}
|description = Something...
|quest = Gather ...
|element = Plant
.
.
.
}}
#

But not sure if that would make it more readable or just harder to deal with (since everything is on its own page)

quasi terrace
# kind cliff around 700, and very little but willing to learn

Okay so here is a description of what switch does
https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##switch

The ParserFunctions extension provides eleven additional parser functions to supplement the "magic words ", which are already present in MediaWiki.
(It may be configured to provide additional parser functions for string handling; these string functions are documented elsewhere .)
All the parser functions provided by this extension take the form...

#

Essentially you give it a parameter and it returns a value associated with it

quasi terrace
#

That's how the templates you linked all work

#

But they have data for more than 1 thing on a page

kind cliff
#

understandable, though my only concern was the dragon variable page was spanned across three pages, in which admins can only edit 2 of them, the information for over 700 dragons became too much

quasi terrace
#

Yeah, that's why using lua would be better. It should be possible to store data for 700 in one lua module that way

quasi terrace
#

Because in your case you either have to split the data into multiple pages, use lua, or store data for each dragon on a separate page (that's 700 pages)

kind cliff
#

its an option, possibly one i'd prefer actually

#

but thank you for talking to this about me, even if its difficult its worth it to me for a wiki

quasi terrace
#

Just the introduction

#

After setting it up it can be used like a template

kind cliff
#

just so i get all my bases clear, what would benefits be to lua over the #switch template

quasi terrace
#

the #switch can lag heavily in edit mode at around 100 dragons (or 200 if you don't have much data). With 700 it definitely will

#

And there's a template include limit on pages to keep in mind. Too heavy templates will fill it too quickly

#

lua handles it better performance-wise

#

With lua you could also do some things with the data before displaying it (like formatting numbers or sorting)

#

But yeah definitely let me know if you want to go with #switch anyways

kind cliff
#

will do! i'll consider it

quasi terrace
#

When you decide, send me a link to your wiki and I can help you set the template up, regardless which one you choose pupCoffeeMH I should be available for next 3 hours

kind cliff
#

i might be discussing this for a long time but we'll see! i appreciate it

quasi terrace
#

Ah no rush then. If you have more questions feel free to ask here

weak flare
kind cliff
#

Also the dragon mania legends wiki is very pretty

quasi terrace
#

DPL is an extension (short for Dynamic Page List). More specifically DPL3

weak flare
#
DynamicPageList3 Manual

DynamicPageList3 (DPL3) is a powerful MediaWiki extension that generate lists of pages, page properties (metadata), and/or template parameter values, for display in other articles. DPL3 lists are automatically updated whenever the data it fetches changes and the cache is cleared or expires. The output can be formatted to create a range of displa...

kind cliff
#

it might possibly be closer to what i want, instead of lua for people to more easily edit, though i am overwhelmed in thinking how i could do what i want

weak flare
#

We use dpl3 to get the event pages that link to a specific dragon (= has it as a reward)

The rule is that all other Dragons mentioned on the event page must not link to them, if they are not a prize in the event

#

Works for out needs

#

Currently we are thinking of entering the prize dragons into the events cargo table for it would be much faster to display