[pmwiki-users] Conditional Markup question
Patrick R. Michaud
pmichaud at pobox.com
Mon Jun 19 13:02:56 CDT 2006
On Thu, Jun 15, 2006 at 04:32:55PM -0400, David Spitzley wrote:
> >>> "Patrick R. Michaud" <pmichaud at pobox.com> 06/15/06 3:48 PM >>>
> On Thu, Jun 15, 2006 at 03:18:26PM -0400, David Spitzley wrote:
> > > I'm trying to create a pagelist format that will append "- New"
> > > to the end of any item with a create date less than 30 days old.
> > > Any suggestions on how to do that?
> >
> > Easiest is probably to create a custom page variable for it.
> >
> > $FmtPV['$New'] =
> > '($page["ctime"] > time() - 30 * 86400) ? "- New" : ""';
> >
> Ok, I've done that, but now that I've created the new format in Site.LocalTemplates, the pagelist that calls it generates no results, while using fmt=title still works. Here's my format statement:
>
> !!!fmt=#newtitles
> [@
> [[#newtitles]]
> * [[{=$FullName}|+]] {=$New}
> [[#newtitlesend]]
> @]
>
>
> Ok, {$New} works on a new page, so there's something else going on. I set up the wiki on Saturday, so Site.LocalTemplates should be a valid place for the template, and from what I can see BlogSimple2 uses $FPLTemplatePageFmt to add the BlogTemplates page while preserving Site.LocalTemplates:
>
> $FPLTemplatePageFmt = array('{$Group}.PageListTemplates', '{$SiteGroup}.LocalTemplates', '{$SiteGroup}.PageListTemplates', '{$SiteGroup}.BlogListTemplates');
>
> Any other thoughts as to what could be causing this problem?
Nope, I'm a little stumped on this one. Is there perhaps
another [[#newtitles]] anchor hiding somewhere?
Is there a url I could look at?
Also, just to verify: Site.LocalTemplates only works in versions
2.1.10 or later.
Pm
More information about the pmwiki-users
mailing list