[pmwiki-users] Nested divs needed for blog styling...

Mikael Nilsson mini at nada.kth.se
Mon Dec 12 03:41:46 CST 2005


sön 2005-12-11 klockan 21:54 -0600 skrev Patrick R. Michaud:
> On Sun, Dec 11, 2005 at 10:50:17PM -0500, Ryan R. Varick wrote:
> > On 12/11/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > Perhaps don't use the div markup for the box -- just use a normal
> > > HTML <div> tag:
> > >
> > >          $digest  .= "\n<div class='blogitem'>\n";
> > >          $digest  .= $stuffing;  // The actual post.
> > >          $digest  .= "\n</div>\n";
> > 
> > This is the solution.  I'll be adding code similiar to this to
> > alternate back and forth between two blog classes (for different
> > backgrounds).
> > 
> > Just FYI, you have to have to add div to $AllowedTags set in order for
> > this to work.
> 
> If $digest is being built from within a markup rule, you shouldn't
> need $AllowedTags or the EnableHTML recipe.  Ohhhh, I see, you're
> setting up $digest to be saved in the page, not as markup processing.  

Well, not really. But the digest (included in the page using
(:blogdigest:) ) is built using markup, essentially concatenating a
number of wiki pages each containing a blog item. The whole thing is
passed through MarkupToHTML after this step... So it's sort of saved
temporarily, but never to an actual wiki page...

> 
> I'd do it entirely differently then -- I'd create a 
> (:blogitem:)/(:blogitemend:) markup to be saved in the page and that
> translates into <div>...</div>, and have $digest use (:blogitem:).

I think rather that the loop needs to be reengineered to call
MarkupToHTML in the inner loop, allowing you to use HTML outside of that
call...

/Mikael

-- 
Plus ça change, plus c'est la même chose





More information about the pmwiki-users mailing list