Reputation: 445
I've created a standard Wiki template, which creates an infobox for songs. I defined "artist" as a parameter, applied *
characters to create a list and added brackets around the names of its contributers. Here is a example:
{{song infobox
|artist= * [[Lady Gaga]] (Music & Lyrics)
* [[Zedd]] (Vocal arrangement)
* [[The Gagaband]] (Guitar, piano, drums)
}}
Now I started working with Semantic Mediawiki to get access to this data from another wiki page, but unfortunately it does't work with the square brackets. Is there any way to fix this?
My next try was to write the data into a single line (seperated by a ;
character). With the following code I was able to set multiple values to a single property:
{{#set:
|artist={{{artist}}}|+sep=;
}}
My problem here is, that those separated values get displayed as links including further explaination like (Music & Lyrics)
. Also, if I want to display them as a list again using the command {{#show: Pokerface | ?artist |format=ul}}
it displays the artists in one row with only one point at the beginning.
I have also heard about subobjects but I am unsure if this would help me in this case.
What would be your recommendation to me?
Upvotes: 1
Views: 1137
Reputation: 66
I would restructure your template.
{{song infobox
|Music author=Lady Gaga
|Lyrics author=Lady Gaga
|Vocal arrangement author=Zedd
|Guitarist=The Gagaband
|Pianist=The Gagaband
|Drummer=The Gagaband }}
If you had a song with two values for a property like Guitarist, then separate by a comma.
You'll have to modify your queries on the song infobox template to handle these different properties how you want. You might want to use Semantic Compound Queries, but it's not required.
Upvotes: 1