[pmwiki-users] Divisions, IDs and Styles

Hans hans.bracker at googlemail.com
Thu Aug 10 14:59:29 CDT 2006

I will try to answer some points myself here, but still would like
your comments,
especially about point 2.

On 10/08/06, Hans <hans.bracker at googlemail.com> wrote:
> 1. Do the new (:div1:)  (:div1end:) etc directives also apply to
> >>div1<< >>div1end<< or not?

It seems not ot apply to >>div<< type divisions.

> 2. As div1 div2 etc gets used as a div identifier internally for
> pmwiki, can it please be extended to be used as the div's id, if no id
> is provided?
> So (:div3:) is the same as (:div3 id=div3:), but (:div3 id=somediv:)
> has id=somediv, not div3.
> This would make it a lot simpler to build nested menus etc, shortening
> the markup code.

A small change to the Cells function in stdmarkup.php will do this:
I propose to replace the last lines of the function

  } else {
    $out .= "<div $attr>";
    $cf[$key] = '</div>';
  return $out;

with this:

  } else {
      if (!strstr($attr, "id=")) $out .= "<div id='$name' $attr>";
      else $out .= "<div $attr>";
    $cf[$key] = '</div>';
  return $out;

Anyone who supports such a change to make ids easier in (:div:) markup?

> 3. Can I mix freely (:div1:) and >>div<< type divisions?

I guess not with nested divs.



More information about the pmwiki-users mailing list