Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

When writing articles on the MediaWiki platform (e.g. Wikipedia), I have often found myself wanting to write content in a higher-level section after writing content in a subsection. For example, consider a dummy article about apples:

== Types of Apples ==
Apples come in many different varieties.

=== Red Delicious ===
Bright red and tasty.

=== Granny Smith ===
Green and tart.

For more information on Apple varieties, please visit [[Apple Varieties]].

I would like the last line "For more information…" to be associated with the second-level section "Types of Apples". However, it is currently associated with "Granny Smith" instead.

How do you make text underneath a subheading associated with a higher-level heading instead?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

I don't think this can be done, and that is by design. A section is intended to end with the heading of a new section. The described situation would create some ambiguity, because there are no visual cues on the page to define where a section ends except for the header of a new section. It may also be unnecessary, because a default install of MediaWiki shouldn't distinguish subsection content from other sections -- the only thing that distinguishes content is the headings themselves. You can read more about sections here.

Creating sections and headings in MediaWiki is analogous to creating an outline, with the intent of creating a well-defined structure, or hierarchy of content. You can read at length about this on the Layout article of Wikipedia's Manual of Style.

Handling the example situation

The example you gave can easily be adapted to this design format. The section hierarchy is currently broken into this hierarchy:

  • Types of Apples
    • Red Delicious
    • Granny Smith

The link you provided directs to an article with more information about "apple varieties," which seems synonymous to "types of apples." In this case, you could integrate that link immediately under the header, or create a new subsection to elaborate on it.

1. Using the {{Main}} Template

The link you provided directs to an article with more information about "apple varieties," which seems synonymous to "types of apples." In this circumstance, the Manual of Style recommends taking advantage of the "main" template, which allows you to generate a link to that article right under the associated header. See here for an example.

If you're using a wiki that for whatever reason does not have a Main Article template, you can create a quick one with the code below:

<blockquote>'''''Main Article: [[{{{1}}}|{{{l1|{{{1}}}}}}]]'''''</blockquote>
<noinclude>Link to a main article from a summary, immediately following the heading of the associated section.
</noinclude>

2. Creating a New Subsection

You could also assign "Other types of Apples" as a subsection in your hierarchy, as given below:

== Types of Apples ==
Apples come in many different varieties.

=== Red Delicious ===
Bright red and tasty.

=== Granny Smith ===
Green and tart.

=== Other types of Apples ===
For more information on Apple varieties, please visit [[Apple Varieties]].

Adding this third subheading doesn't violate the structure we've created with "Types of Apples" since "Other types of Apples" is appropriate in relation to the parent heading.

Discussion

I think that either of these situations would be acceptable, with the big takeaway being that although we can't pause a section on the page and pick it up later, we do have other options to effectively integrate that content. The first option is useful especially when you're just summarizing content, and the second option is useful if you are planning on having an extended discussion of that content.

share|improve this answer
    
Thanks for the response. Your solution actually has similar characteristics as the issue on hand: your last paragraph ("I think…") is below the heading "Creating a New Subsection", even though it probably belongs under "Handling the example situation". :-) But if MediaWiki doesn't provide something elegant, then creating more subsections seems like a reasonable solution in most cases. –  vote539 Mar 19 '13 at 4:39
    
Good point. I'll adjust that for completion's sake. –  Hyper Anthony Mar 19 '13 at 17:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.