[pmwiki-users] including page with divs in a div

Lars Eighner surname at larseighner.com
Tue Mar 19 14:37:01 CDT 2013

Due to some mental malfunction, I always assumed that div, div1, div2, etc.
had to be nested in order (i.e. div1 had to be the child of div, div3 had to
be the child of div2, and so forth). All the examples are like that.

But this appears not to be so.  What counts seems to be that the nested
divs are unique and each has it's unique end tag (all properly nested, of

So, if you want to include a page (or part of one) which has divs in it in a
div all you have to do is give the including div a number larger than
any div that will occur in the included page:


(:include MyOtherPage :)


What does NOT work:

(:include MyOtherPage :)

because the first (:div:) in the included page will close the div in the
current page.

Even if you have a highly DIVed layout (like 3-columns, source ordered) most
of the mayhem is occuring in the skin template, and you are unlikely to need
more that 3 or 4 levels of divs in the content.

This arises because I wanted to include the original page on a comments
page, but I wanted to give it another background color and border to help
provide a clue that it was not the original page.  This is how comments are
done (at least by default) on Blogger, etc.  It is convenient for commenters
and keeps the original text a step away from less trusted users.

It would be nice if a filter could adjust attachment references in case
authors of the original pages have not specified the group in the
attachment, but this fix is so cheap I can live with it by adjusting my
templates for original pages.

My eyes glazed over at the include code in stdmarkup, and I'm just not in
the mode for what I had in mind to begin with which was a filter to
step-down all the divs and fix the attachments.

Lars Eighner
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

More information about the pmwiki-users mailing list