[pmwiki-users] Re: Re: $DefaultName - Per Group Custom

Iram Hernandez iramhernandez at yahoo.com
Fri Jan 28 14:20:22 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                           

Thanks Hans,

I guess I didn't explain the situation very well.  I
have the following requirements.

Main/Introduction
Chapter1/TableOfContents
Chapter2/TableOfContents
AnyNewGroup/TableOfContents

I set the $DefaultPage = "TableOfContents"; on
config.php so that that will be the default on all new
groups.

I set the $DefaultPage = "Introduction"; on Main.php
so that only my Main group will have the Introduction
as the main page.

The $DefaultPage in the Main.php is not overwriting
the $DefaultPage in the config.php.

I have been able to work around the problem by setting
in config.php
$DefaultPage = 'Main/Introduction';
$DefaultName = 'TableOfContents';

This does what I need but it seems to me that the
variable in the Main.php should override the one in
config.php

--
Iram


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250



More information about the pmwiki-users mailing list