Wikia

Solar Cookers World Network

Main template

1,861pages on
this wiki

Forum page

Revision as of 21:43, April 19, 2007 by Beth Ogilvie (Talk | contribs)

(diff) ← Older revision | view current revision (diff) | Newer revision → (diff)

This Forum has been archived

Visit the new Forums
Forums: Index > Village pump > Main template


I copied the Main template from Wikipedia just now. The practice on Wikipedia is to create subarticles when articles become too long and cumbersome to read and edit. The content under a heading is moved to the new subarticle and replaced by a brief summary. The Main template is used to link the subarticle to the original article and visa-versa. A Details template exists that was intended to link from the subarticle to the original, but most editors use Main for the references in both directions. I added Main to Frequently-asked questions so you could see its result and usage.[1] I don't think we have to use this template here, but I want you to know about it. Walter Siegmund

Looks fine. Thanks. But what in the world is all this stuff?

:<div class="noprint">''Main article{{#if:{{{2|}}}|s}}: [[{{{1}}}|{{{l1|{{{1}}}}}}]]{{#if:{{{2| }}} |{{#if:{{{3|}}}|, | and }}[[{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}} |{{#if:{{{4|}}}|, |, and }}[[{{{3}}}|{{{l3|{{{3}}}}}}]]}}{{#if:{{{4|}}} |{{#if:{{{5|}}}|, |, and }}[[{{{4}}}|{{{l4|{{{4}}}}}}]]}}{{#if:{{{5|}}} |, and [[{{{5}}}|{{{l5|{{{5}}}}}}]]}}''{{#if:{{{6| }}}| (too many parameters in {{[[Template:main|main]]}})}}</div>

I know some of the pieces, like the &#nn; codes represent characters, e.g. { = '{' (Is there a nice table of these somewhere? A quick search didn't turn one up.) and templates can take parameters that look like {{{1|<defaultvalue>}}}. But I'm having trouble making sense out of these #if: statements. It looks like it's {{#if: ...... }} but where does the test boolean end and the "then" clause begin? Can it have an "else" clause? Geez this code is hard to read, even in "edit" mode where it's somewhat formatted. I've been writing perl code for years, and people say that looks like line noise, but it can't hold a candle to this. --Beth Ogilvie 14:58, 25 January 2007 (UTC)

I'm sorry, but I don't know more than you on this subject. You are right. It is more opaque than perl. Main does seem to work as advertised. See Template talk:Main for usage. See m:Help:Template for template help. Walter Siegmund 18:44, 25 January 2007 (UTC)
I think the code above tests for more than one parameter and adds that parameter to the output, if present. Walter Siegmund 18:46, 25 January 2007 (UTC)

I'm resistant to using this template in the Compendium, since it seems to me it's designed for a structured set of articles where there is a top (main) article and a set of detailed articles. We'd used the Details template to refer from the main to the sub articles, and Main to refer back from the details to the main one. But in the Compendium, there aren't any details on the summary page, so "more details" doesn't fit, and "main article" (referring to the subarticles) doesn't seem to me to fit either. "See Xxx" seems to me quite adequate for the purpose. I could italicize it if that would make it more standard. I'm not wild about the indentation either, I'm afraid. I find it jarring. --Beth Ogilvie 15:40, 26 January 2007 (UTC)

In the Compendium, I would retain the original major headings and write a one or two sentence summary to replace the content each place that it was removed. The idea of the summary is to give the reader a better sense of the content so that s/he can decide whether to follow the link, or not. The way it stands, someone who with little knowlege, who sees the link "Parabolic reflectors", has to follow the link to learn what a parabola is and that it is difficult to fabricate such a reflector. The summary style posits that brief summaries to that effect are an aid to the reader. Often, the summary is the same or very similar to the opening paragraph of the subarticle, so they are little work to add. My $0.02. Best wishes, Walter Siegmund 17:43, 26 January 2007 (UTC)

The discussion was becoming fragmented, so I moved it to Talk:Compendium_of_solar_cooker_designs. Please watchlist that page, if you haven't done so.

Around Wikia's network

Random Wiki