Forum:Can a notice template have a category switch option ?

I've seen it done with image boxes for uploads, but I want to try doing one using a notice (aka ambox) template for articles.-- Bunai82 (talk) 23:28, September 10, 2011 (UTC)
 * Not sure what you're asking. Are you trying to get a template that changes its message depending upon category in which it's placed? If so, the answer's yes, because you would just do a switch on the , as at tardis:template:ooucat. Dunno if that helps or not.
 * 23:43:14 Sat 10 Sep 2011


 * Um, I'll try a visual example. Your link maybe the base of what I want.
 * The parameters for the "#switch Reason" would be "positive" and "negative". What I would like for the parameters to do is link an article to a category, depending on which one is in place. I would also like the parameters message to display in the Notice.

-- Bunai82 (talk) 01:42, September 11, 2011 (UTC)




 * Won't simply this do what you want? Or did I misunderstand the question? — Sovq 06:35, September 11, 2011 (UTC)


 * I think it will work. However, can a template be in place of category?
 * And then, that template will be the link to the category? -- Bunai82 (talk) 00:40, September 12, 2011 (UTC)


 * Yes, everything that you can put in an article with regular markup can be put behind the "=" for switch function cases and it will be displayed if the test string matches the case string (positive, negative, etc.). You can put a table, template, category link, gallery, anything really. — Sovq 06:17, September 12, 2011 (UTC)


 * Thank you, I will try it out. -- Bunai82 (talk) 18:17, September 12, 2011 (UTC)

October switch option part2
Hello, the solo one worked, but I want to try an increase the number of text that can be displayed in the notice. I've been looking for switch templates but many don't make it clear on how to do it.
 * Template:Notice switch testing 2

I made this as a test, it currently is a single message type that I want to edit. -- Bunai82 (talk) 15:45, October 7, 2011 (UTC)


 * You can just add another switch function anywhere to the template, which will display results depending on parameter in addition to what's added with  , can't you? — Sovq 16:38, October 7, 2011 (UTC)


 * I tried that but it seems I made a mistake on how to end the parameter. -- Bunai82 (talk) 04:54, October 8, 2011 (UTC)
 * Bumps -- Bunai82 (talk) 04:58, October 17, 2011 (UTC)


 * Could you give a link to the actual template, preferably with the second parameter added? It's hard to solve the problem without seeing it. — Sovq 06:43, October 17, 2011 (UTC)


 * Hmm, maybe this one Here, I think...
 * Only not with images sorting, it is to have more than one message in the notice, but the template should sort into categories.


 * If someone wanted Artwork and Grammar help, they would put something like - Art -message displayed | Gram -message displayed. And those two tags would sort their page into two categories. -- Bunai82 (talk) 22:35, October 19, 2011 (UTC)