[pmwiki-users] $DefaultName - Per Group Custom

Hans Bracker design at flutesong.net
Fri Jan 28 02:59:37 CST 2005


Friday, January 28, 2005, 6:48:22 AM, Iram wrote:

> I am trying to set up my Main group to have a
> DefaultName  of Introduction but I am having problems.

> I have set $DefaultName = 'TableOfContents'; in my
> config.php and have created a Main.php in my local
> directory with $DefaultName =  'Introduction';

> The contents of my Main.php are:

> <?php if (!defined('PmWiki')) exit();

> ## Per Group Customization
> $DefaultName = 'Introduction';
> $Skin = 'dropdown';


> The $Skin = directive is working so I'm not sure why
> the DefaultPage isn't.  Can anybody help?

I am not sure what exactly you try to achieve, but I try to explain
anyway. See PmWiki/Variables. I am making the assumption that you wish
to have a different group from 'Main' as your default. But I may well
have misunderstood you.
In local/config.php you can set

$DefaultGroup
   WikiGroup used by default (on startup) when no group is specified
   in the URL. Note that changing this value doesn't change the locations
   to existing distributed pages such as Main.Search Wiki, Main.Side Bar, etc.

So if you have a group called 'Introduction' you can set
$DefaultGroup = 'Introduction';
and
$DefaultPage = 'TableOfContents';
that will bring up the page TableOfContents in the group Introduction
as the homepage of your wiki.

but note that $DefaultPage set like this in config.php will also
define the default page pmwiki looks for if only the group name is
entered, so as an example if you have another group called
'ChapterOne', ChapterOne.TableOfContents is your default page for that
group, etc. You can override this with setting a different default
name in a $Group.php file in local (as you tried for Main group).


Hope this helps.

~Hans                           




More information about the pmwiki-users mailing list