On Tue, May 10, 2011 at 6:46 AM, Oguz Altun <[email protected]> wrote:
> I build my sidebar from (:pagelist:) searches. Is it possible to not see
> empty (as in all the content is deleted in the edit window, but the history
> is there) pages? I would prefer that to actually deleting pages.
You could put together a custom conditional ("notempty"?) that
accepted a pagename as an argument. It would simply read in the page
and then just return !preg_match("/^\s*$/s", $page['text'])...
Then in your pagelist you would use (:pagelist ... if="notempty
{=$FullName}" ... :).
See http://www.pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples#intext
for an example to follow.
Or another approach would be to create a PV {$EmptyPage} which would
return 1 or 0 depending on whether it was empty or not.
-Peter
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users