Hi everyone,
I'm working on a Wikia of a daily Belgian TV-show https://nergensbeterdanthuis.fandom.com/nl/wiki/Thuis_wiki. In order to keep track of the many images for the many episodes, I give every image the same sequence structure, for example: Thuis_afl5579_T1_SamTim.jpg. This sequence includes the show name, the episode number, the count for images of that episode, and the names of each character appearing in the frame.
Now, I want to create the following algorithm: I have a template in which I list all of the images of one season (just a list of raw file names). When I use the template on the page of a specific character (in a gallery), I want the template to only return the lines that include the name of that character. When I use the template on the page of a specific episode (in a gallery), I want the template to only return the lines that have that episode nummer in it.
For example, if this is the content of the template:
Thuis_afl5579_T1_SamTim.jpg
Thuis_afl5579_T2_TamaraLowie.jpg
Thuis_afl5579_T3_EddyVince.jpg
Thuis_afl5580_T1_EmmaCedricSilke.jpg
Thuis_afl5580_T2_Eddy.jpg
And I want to use it on the page of the character 'Eddy', I want the template to return only these lines:
Thuis_afl5579_T3_EddyVince.jpg
Thuis_afl5580_T2_Eddy.jpg
So I want the template to only return the lines that include a given sequence of text.
Does somebody have an idea how to make this work?
Thank you in advance! Would make my Wikia so much more efficient!