[pmwiki-devel] Preventing Embedded Markup Expressions

Petko Yotov 5ko at 5ko.fr
Sun Jul 4 07:55:06 CDT 2010


On Sunday 04 July 2010 02:43:58, DaveG wrote :
> On 7/3/2010 5:56 PM, Petko Yotov wrote:
> > On Saturday 03 July 2010 23:29:15, DaveG wrote :
> >>     (:includesection "#common-blog-head title='{(bi_encode {*$Title})}'
> >> entrydate='{*$:entrydate}' entrytags='{(bi_encode {*$:entrytags})}'
> >> entryauthor='{(bi_encode {*$:entryauthor})}' listformat=false ":)
> > Also, maybe you just don't need to send include variables title='...'
> > entrytags='...' and use {$$title} and {$$entrytags} in the included
> > section: use directly {*$Title} and {*$:entrytags} which will be read
> > from the current page.
> 
> Unfortunately, the header can be called from either a pagelist or a
> 'normal' page. So I need to includesection passing parameters of either
> {*$Title} or {=$Title}, depending on whether it's called from a single
> page, or pagelist. Hence, the includesection parameters.

Or you can have two header sections, one called from the page and containing 
{*$Title}, the other called from the pagelist and containing {=$Title}. 
This could be much easier to do than writing custom functions in order to use 
the same section. It could also allow blog listing (pagelist) headers to be 
different from page headers: for example someone could prefer a much 
simpler/thinner listing of many entries than the head section of the full blog 
entry. Anyways, there is often more than one way to do things. :-)

Petko



More information about the pmwiki-devel mailing list