Template talk:Main

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

Anyone have a problem with adding a second parameter so we can specify the link text to display? For example if I wanted to link to Sierra Nevada on the Commercial Beers page I can't do it right now. --Bradsul 10:46, 1 November 2007 (CDT)

I'm not sure I understand; the link above works fine for me, and takes me right to the Sierra Nevada section. What would the second parameter be?--Chapka 14:21, 1 November 2007 (CDT)
It's about changing the text that is displayed. Which is to say I would like 'Main article: Sierra Nevada' instead of 'Main article: Commercial Beers#Sierra Nevada'. When you use the template as it is now and try to give the link text like this: {{Main|Commercial Beers#Sierra Nevada|Sierra Nevada}} the engine treats the '|Sierra Nevada' as a parameter to the template instead of the second part of the link tag which means you get the latter example instead of the former. --Bradsul 15:02, 1 November 2007 (CDT)
I've modified the template to accept an extra parameter to handle this. Any existing links to the template are unaffected but if you pass an extra parameter you can change the link text. --Bradsul 22:43, 2 November 2007 (CDT)
Got it. That'll also be helpful for links to categories.
Top