[pmwiki-users] {(...)} markup recipe available

Tegan Dowling tmdowling at gmail.com
Fri Apr 13 10:59:51 CDT 2007


On 4/13/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Fri, Apr 13, 2007 at 08:58:59AM -0500, Tegan Dowling wrote:
> > On 4/11/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > >I've now published my version of the {(...)} markup as a recipe,
> > >available at
> > >
> > >    http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
> > >
> >
> > 1) recipe page doesn't mention pre-requisites.  I'm running v2.1.26 -
> > will it work for me?
>
> I didn't try it with PmWiki 2.1.x, but looking quickly through
> the recipe I don't see any obvious reason why it shouldn't
> work.  (If it doesn't work, it could probably be made to work
> without too much difficulty.)

It does seem to be working nicely, thanks!

>
> > 2) will this work inside pagelist templates?  I'll want to pagelist a
> > PmCalendar wikigroup, which  creates pages in the format yyyymmdd.  It
> > would be wonderful if this could be used in a pagelist template to
> > convert outputs to the site's default date format.
>
> Yes, it's explicitly intended to work inside of pagelist templates.
> If the pagenames contain something matching "yyyymmdd" or
> "yyyy-mm-dd", they can be used directly with {(ftime)} inside
> of a template.  For example:
>
>     * [[{=$FullName}|{(ftime '' {=$Name})}]]
>
> would display pages using the site's default date format for each pagename.

The pagelist is also working.  This is great!

Now, in a GroupHeader, I'd like to have
! (:if pagename-format is text:){$Titlespaced}(:else:){(ftime ''
{$Name})}(:ifend:) OR

! (:if pagename-format is time:){(ftime ''
{$Name})}(:else:){$Titlespaced}(:ifend:)

Any thoughts on a way to accomplish one of those?



More information about the pmwiki-users mailing list