Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

DivisionsExplained

Summary: Explanation of (:div:) and >>..<< markup for creating page sections (divisions)
Version: 2007-04-17
Prerequisites: PmWiki 2
Status:
Maintainer:
Categories: Layout

Questions answered by this recipe

How do I use the (:div:) or >>...<< markup?
How can I create sections or divisions in page content?
Can I use nested divisions?

Description (First info dump from user list:

Basic (:div:)...(:divend:) markup

Using the shortform >>...<< markup

Nesting divisions

In addition to the normal (:div:)...(:divend:), one can also
suffix "div" with a number to indicate a specific div to be
opened or closed.  For example (indentation shown for clarity):

    (:div:)           <div>                start a new div
    abc                 <p>abc</p>
    (:div1:)            <div>              start a (nested) div1
    def                   <p>def</p>
    (:div1:)            </div><div>        close prev div1, start new div1
    ghi                   <p>ghi</p>
    (:div1end:)         </div>             close prev div1
    jkl                 <p>jkl</p>
    (:divend:)        </div>               close div

Any sequence of digits can be used to distinguish one div from another.
The digits don't imply any sort of ordering relationship -- they're
simply used to match up opening and closing div tags.  For example,
each of the following columns all output the same results:

    (:div1:)            (:div3:)          (:div2:)
    (:div2:)            (:div2:)          (:div1:)
    (:div3:)            (:div1:)          (:div3:)
       text                text              text
    (:div3end:)         (:div1end:)       (:div3end:)
    (:div2end:)         (:div2end:)       (:div1end:)
    (:div1end:)         (:div3end:)       (:div2end:)

Closing a div automatically closes any nested divs that were started
inside of it.

Applying styles to divisions

Notes

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

Comments

See Also

  • Block markup This page covers all the block markup character combinations
  • Wiki styles Modifying the style of page contents

Contributors

Edit - History - Print - Recent Changes - Search
Page last modified on April 20, 2007, at 07:11 PM