[pmwiki-users] Can two different groups have the same titles?

Hans design5 at softflow.co.uk
Thu Dec 7 07:45:24 CST 2006


Thursday, December 7, 2006, 1:23:28 PM, Shujun wrote:

> Thanks for the information, but I don't know how to use it.
> Can you please show me an example? Thanks.

> I have tried to add the following line in ABC_cn.php, but it does not work:
>  $GroupTitle = 'ABC';

I assume you installed the script according to the instruction on the
cookbook page. Then you can use in wiki pages the new page variables:
{$GroupTitle} and {$GroupTitlespaced}, and in a skin tmpl file you can
use also $Grouptitle and $GroupTitlespaced, as placeholders where the
group title should be displayed.

To define a GroupTitle the description says:
The group title is taken as the first title found in GroupAttributes,
GroupHeader, GroupFooter, Group.Group, or Group.HomePage. If none of
these pages have titles, then the name of the group is used (spaced
according to $GroupTitlespaced or $SpaceWikiWords).

So you would use a (:title My Group Title:) directive on for instance
the GroupAttributes or GroupHeader page. Then all pages in the group
can display this title "My Group Title" as group title. But most
likely you would need to modify the skin's template file, so the
name in normal link at the page head for the Group is replaced by
$GroupTitle or $GroupTitlespaced. I.e. in skin tmpl file change
$Group or $Groupspaced to $GroupTitle or $GroupTitlespaced.

The skins I developed have this modification already built in
(FixFlow, Gemini, Triad) and will show the GroupTitle straight away in
the page's titlebar. You can see an example on my test site:
Group 'Test' has got the title 'Test Group':
http://softflow.co.uk/design/Test/TestPages

So for you instead of adding anything to ABC_cn.php you add
(:title ABC:) to the wiki pages ABC_cn.GroupHeader and
ABC_en.GroupHeader. AND modify the skin template.

The documentation is a bit short for this recipe.
Hope these explanations help.


Hans





More information about the pmwiki-users mailing list