[pmwiki-users] Divisions, IDs and Styles

Marc Cooper gmane at auxbuss.com
Thu Aug 31 09:15:58 CDT 2006

Patrick R. Michaud said...
> On Thu, Aug 10, 2006 at 06:34:48PM +0100, Hans wrote:
> > I was playing around with the new division nesting feature,
> > trying to create a hidden treelike structure
> > (see example at http://www.pmwiki.org/wiki/Cookbook/ShowHide)
> > and have  a few questions regards divisions:
> > 
> > 1. Do the new (:div1:)  (:div1end:) etc directives also apply to
> > >>div1<< >>div1end<< or not?
> The markup ">>foo<<"  is not the same as (:foo:), it's the same as
> "(:div:) %foo div%".  Thus, the markup ">>div1<<" isn't the same
> as (:div1:), it's the same as "(:div:) %div1 div%".  

I'm seeing something different.

  (:div:) %foo div% gives me <div class='foo  foo' > 


  (:div:) %div foo% gives me <div class='foo' >

> > 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.
> Possibly, but I'm not sure I want to do it that way.  It certainly
> wouldn't be difficult to create a local custom markup rule that 
> does this.

I agree. It's useful to be able to reuse (:div1:) as a 'raw' <div> - and 
subsequent nested divs - without having to worry about numbering each 
id. In fact, it would negate a lot of the power of PmWiki's nested div 
capability in many cases.

> PmWiki never uses wikistyle definitions inside of (:...:) directives

Doesn't it? I know that you are right, but this feels the right way to 
do it in this case. I suppose it's because we are using (:div1:) in the 
manner of a wikistyle. Ah well.

> I wouldn't want to start with (:div:).  The way to get a wikistyle
> definition applied to a (:div:) is to do:
>     (:div:) %wikistyle div%
> Similarly, one can do the following to apply a wikistyle to a div1 with:
>     (:div1:) %wikistyle div%

As above, this seems to be acting funky.

> Of course, as mentioned in a previous email, I'm still considering the
> use of multiple angle-brackets for div1, div2, so that we'd have
>     >>foo<<             same as   (:div:) %foo div%
>     >>>bar<<<           same as   (:div1:) %bar div%
>     >>>>baz<<<<         same as   (:div2:) %baz div%

Works for me. 


More information about the pmwiki-users mailing list