Jump to content

Topic on Project:Support desk

[RESOLVED] Template problem

7
Nanahuatl (talkcontribs)

There are two different templates in here. First template is desingned for footballer pages (like this) and the second one is designed for club pages (like this). I want to have one template instead of two, so I can update these by one edit. I tried this, it worked, but I also want to see these two different templates in the template page (the second one is invisible as you can see).

Ciencia Al Poder (talkcontribs)

Put the entire code inside a <includeonly></includeonly> (optional), and following that, add a block, adding inside it the "template documentation" that you need, like description of each parameter, and you can include inside it the template itself (a call to the template, namely, {{:Kullanıcı:Rapsar/Çalışma5}}) with both parameters so both flavors of the template would be displayed there.

Nanahuatl (talkcontribs)

Makes sense, but then I should create a documentation page for each template right? An used made this edit, but it is not looking so well now :)

Ciencia Al Poder (talkcontribs)

Ideally, it should be two templates on different pages instead of using a parameter to select which one to display. But if you want the current setup, you can use the same documentation page for both. I've edited it as an example.

Nanahuatl (talkcontribs)

Thank you so much for your interest. But now, if I delete a player from the template, I can't see this edit in preview :(

Ciencia Al Poder (talkcontribs)

I know, that's why you should put both templates on separate pages. An alternative is to move the template outside the includeonly, either permanently or only when editing.

Nanahuatl (talkcontribs)

Problem solved. Just like I wanted :) Thank you again for your interest.

Reply to "[RESOLVED] Template problem"