[pmwiki-users] <!--markup in skin.tmpl and <p></p>

Patrick R. Michaud pmichaud at pobox.com
Thu Jan 18 15:26:18 CST 2007


On Thu, Jan 18, 2007 at 09:38:29PM +0100, Peter Reuterås wrote:
> Hi
> 
> I'm trying the "<!--markup: -->" in a skin template. It's really great
> but I have one problem. I have this code in the skin.tmpl file:
> 
> <!--markup:(:include Public.LoginLogout:)-->

Easier might be 

    <!--wiki:Public.LoginLogout-->

> The included text is placed in a <p></p> block. Is it possible to
> prevent the <p></p> ? The content in Public.LoginLogout is
> 
> (:if authid:)
> [[url1|Logout]]
> (:ifend:)
> (:if ! authid:)
> [[url2|Login]]
> (:ifend:)

PmWiki expects any markup that is "plain text" (i.e., not
part of another block structure) to be enclosed in <p>...</p>
tags.  So, since the links above aren't part of a larger
block, they're treated as paragraph text.

Perhaps we need some markup that mean "just generate this
text block directly -- don't treat it as a paragraph"?  
It should be something that can go on the first line of the
block -- i.e.,  it would go where <<markup>> is indicated below:

    This is a paragraph
    composed of several
    lines of text.

    <<markup>> This is several lines of
    text in a single block, but it's not
    treated as a paragraph.

Then the above would be (again replacing <<markup>> with whatever
we end up using to mean 'not a paragraph'):

    <<markup>>(:if authid)[[url1|Logout]]
    (:if ! authid)[[url2|Login]]
    (:if:)

Perhaps another possibility would be that we would generate
<p>...</p> tags around bare text only if there's a blank line
_somewhere_ in the markup.  That might be more intuitive
for authors, although it might mean that pages containing
only a single block of text (without newlines) wouldn't have that 
text rendered in <p>...</p>.

Thoughts?

Pm




More information about the pmwiki-users mailing list