Forum:Template code question

Just a quick question about the code. What's the difference beviene and. I can't seem to find enough info about how to build templates. Is it just me, or is it hidden somewhere? --Steinninn 06:41, 23 May 2007 (UTC)


 * Somewhere in m:Help:Advanced templates. But the gist is that the second has a default value. Anything after the | is a default value. So if we called a template that had in it, and we gave it the first parameter b then we would see b. But if we didn't pass any variable 1, then we'd see a. If we used  and we passed b we would see b, but if we didn't pass a parameter 1, then we would see  . The difference between  and  is that the second one shows up as nothing when we don't pass anything to the variable. That's why we use  in parserfunctions. Because if we used  and we didn't send any parameters to the template, that would still say true. It would stay true unless we used something like  . ~Dantman(talk) tricks  May 23, 2007 @ 07:08 (UTC)

Aha, I think I understand. I had to read it trough a few times before I understood it. All exepte the last part. But I didn't even ask about it. I'll try and read trough the "advanced templates" and figure it out there. Thanks for the link. And the explanation. I'll try to remember it next time I'm building something. --Steinninn 07:19, 23 May 2007 (UTC)