[pmwiki-users] Re: suggestion for include

Hans design at flutesong.fsnet.co.uk
Sat Aug 6 12:52:53 CDT 2005


Friday, August 5, 2005, 9:39:46 AM, Pierre-Marie wrote:
> We can write (:include GroupName.PageName:)
> Is it possible to complete the pmwiki-directives with a DefaultPage :
> (:include GroupName.PageName  DefaultGroupName.DefaultPageName:) ??

you can ad the following conditional markup definition to config.php:

# ads (:if exists SomeGroup.SomeName:)
$Conditions['exists'] = "PageExists(\$condparm)";

and then use the following markup:

(:include GroupName.PageName:)
(:if !exists GroupName.PageName:)
(:include DefaultGroupName.DefaultPageName:)(:if:)

which includes GroupName.PageName, but if it does not exists it
includes  DefaultGroupName.DefaultPageName

Best, 
~Hans                           





More information about the pmwiki-users mailing list