Board Thread:Support Requests - Getting Technical/@comment-27075564-20180616153426/@comment-9605025-20180616183307

If I understand correctly, you are looking for two things. Unfortunately, it seems there isn't a way to directly get the section name that a template instance was found in. Even if you could, you would still need to process the section name which, in your current format, would basically require you to manually keep a comprehensive list in a switch statement that determines what to do with the data. There are ways you could simplify it by using keywords in the section headers; but this is all moot as we can't directly get the sections names.
 * 1) Link to individual sections for each instance of the template
 * 2) Omit instances in sections pertaining to expansion packs

Since we can't directly get the section names, we will need to try something a little more complicated. You can add two dummy parameters to your template; say  and. How would you use these? You give them the names of the expansion/game (I don't know what the difference is since I don't play any of these) and section. For example:

Then, you change your DPL call around a bit to make use of a new template; let's say it is named. category=The Witcher 3 keys ordermethod=title uses=Template:Infobox Item3 include= {Infobox Item3}:%PAGE%:section:game:image, {Infobox Item3}:%PAGE%:section:game:name format={| class="sortable listing" style="width:100%;"\n! class="unsortable" | Image !! Name ,,,\n|} secseparators =\n|-\n| align="center" |²{Display¦game=desiredgame¦pre=¦,}² \n,|²{Display¦game=desiredgame¦pre=¦,}² \n multisecseparators = }² ²{Display¦game=desiredgame¦pre=¦,}²²{Display¦game=desiredgame¦pre=¦ would look something link this: