Blob


1 version=pmwiki-2.3.8 ordered=1 urlencoded=1
2 author=simon
3 charset=UTF-8
4 csum=http+s, hlt php, pmhlt (+153)
5 keywords=trailing dot, trailing slash, default group
6 name=PmWiki.WikiGroup
7 rev=115
8 targets=Main.WikiSandbox,Main.HomePage,PmWiki.MailingLists,PmWiki.Links,PmWiki.CreatingNewPages,PmWiki.PmWiki,Site.Site,SiteAdmin.SiteAdmin,PmWiki.Search,PmWiki.WikiGroup,PmWiki.SpecialPages,PmWiki.RecentChanges,Site.AllRecentChanges,PmWiki.GroupHeaders,PmWiki.Passwords,PmWiki.WikiAdministrator,PmWiki.LocalCustomizations,PmWiki.GroupCustomizations,PmWiki.BasicVariables,PmWiki.HierarchicalGroups,Cookbook.SubgroupMarkup,Cookbook.IncludeWithEdit,Cookbook.LimitWikiGroups,Cookbook.NewGroupWarning,Cookbook.GetRidOfMain,Cookbook.RecentChangesDeletion
9 text=(:Audience: authors (basic) :)%0a(:Summary: Organising pages into related groups:)%0a(:keywords trailing dot, trailing slash, default group:)%0aPmWiki pages are organized into groups of related pages. This feature was added to PmWiki to allow authors to create their own ''wiki spaces'' of specialized content on their own, without having to become, or rely on, wiki administrators. See [[https://pmichaud.com/|Pm]]'s [[https://pmichaud.com/pipermail/pmwiki-users/2006-March/024838.html|post]] to the pmwiki-users [[mailing list(s)]].%0a%0a!! In-group and cross-group linking [[#linking]]%0aBy default, page [[links]] are between pages of the same group; to create a link to a page in another group, add the name of the other group and a dot or slash to the page name. For example, links to [=Main/WikiSandbox=] could be written as:%0a%0a(:markup class=horiz:)%0a* [[Main.WikiSandbox]]%0a* [[Main/WikiSandbox]]%0a* [[(Main.Wiki)Sandbox]]%0a* [[Main.WikiSandbox | link text]]%0a* [[Main.WikiSandbox | +]]%0a(:markupend:)%0a%0aTo link to the [[#groupdefaultpage | default home page]] of a group, the name of the page can be omitted, like this:%0a%0a(:markup class=horiz:)%0a* [[Main.]]%0a* [[Main/]]%0a(:markupend:)%0a%0a!! Creating groups [[#creategroups]]%0aCreating a new group is as easy as [[creating new pages]]; simply edit an existing page to include a [[link(s)]] to the new group's default home page (or any page in the new group) then click on the '?' to edit the page. As a rule, group names must start with a letter (but this can be changed by the wiki administrator by adding %0a-> %25hlt php%25@@[@$GroupPattern = '[[:upper:]\\d][\\w]*(?:-\\w+)*';@]@@%0ain @@config.php@@).%0a%0aFor example, to make a default page in the group Foo, create a link to [=[[Foo/]]=] (or [=[[Foo.]]=]). %0aTo make a page called Bar in the group Foo, create a link to [=[[Foo/Bar]]=] and follow the link to edit that page.%0a%0a!! Groups in a standard PmWiki distribution [[#stdgroups]]%0a* [[Main]]: The default group. On many wikis, it contains most of the author-contributed content. @@Main.HomePage@@ and @@Main.WikiSandbox@@ come pre-installed.%0a* [[PmWiki]]: An edit-protected group that contains PmWiki documentation and help pages.%0a* [[Site]]: Holds a variety of utility and configuration pages used by PmWiki, including [[%3c%3c]][=SideBar=], Search, Preferences, Templates, and [=AllRecentChanges=].%0a* [[SiteAdmin/]]: Holds a number of password protected administration and configuration pages used by PmWiki, including [[%3c%3c]] [=ApprovedUrls=], and Blocklist%0a%0a* To list all the groups in a site, try [[PmWiki/Search | searching]] for "[[{$FullName}?action=search&q=fmt%253Dgroup|fmt=group]]".%0a* To list all the pages in a group, try [[PmWiki/Search | searching]] for "[[{$FullName}?action=search&q={$Group}%252F|GroupName/]]".%0a%0a[[#specialpages]]%0a!! [[(PmWiki:)Special Pages]] in a Group [[#specialpages]]%0aBy default, the ''[[Recent Changes]]'' page of each group shows only the pages that have changed within that group; the ''[[Site.All Recent Changes]]'' page shows all pages that have changed in all groups.%0a%0aEach group can also have ''[[Group Header(s)]]'' or ''Group Footer'' pages that contain text to be automatically prepended or appended to every page in the group. A group can also have a ''Group Attributes ''page that defines attributes (read and edit passwords) shared by all pages within the group. %0a%0aEach page can also have its own individual read/edit password that overrides the group passwords (see [[Passwords]]).%0a%0aFinally, [[wiki administrator]]s can set [[local customizations]] on a per-group basis--see [[Group Customizations]].%0a%0a[[#groupdefaultpage]]%0a!! Group's default page [[#defaultpage]]%0a%0aThe default "start page" for a group is a page whose name can be: %0a# the same as the group (@@Foo/Foo@@)%0a# @@HomePage@@ (@@Foo/HomePage@@)%0a# a name that the administrator has assigned to the [={$DefaultName}=] variable in the configuration (@@[farm]config.php@@) file. %0a%0aNote, on this site, the value of [={$DefaultName}=] is ''{$DefaultName}'' and, thus, the default home page would be @@Foo/{$DefaultName}@@. %0a%0aYou can usefully change the default ''search'' order for an entered page name by setting the variable @@$PagePathFmt @@ in @@config.php@@, eg%0a-> %25hlt php%25@@ $PagePathFmt = array('$Group.$1', '$1.$DefaultName', '$1.$1', '$DefaultGroup.$1', 'Profiles.$1'); @@%0awhere "$1" is the name of the page entered. %0a%0aIf you are setting $DefaultName in order to make a start page for your groups, you will need to also define $PagePathFmt (see above) to get consistent use of this functionality. The simplest setting would be this:%0a-> %25hlt php%25@@ $PagePathFmt = array('$Group.$1', '$1.$DefaultName'); @@%0aNote that the order of the definitions of these variables ($DefaultName and $PagePathFmt) is important - it must occur before any call to ResolvePageName() and it (therefore) it cannot occur in a per-page or per-group customization script.%0a%0aAs noted above, when linking to the default home page, authors can omit the page name and simply identify the group followed by a forward slash ([=[[Foo/]]=]).%0a%0aNote the forward slash is required to ensure that the link unambiguously points to the identified group. %0aIf the slash is omitted, the link can end up being interpreted as pointing to an existing (or new) page in the current group (if the group, or its default home page, do not exist). %0a%0a!! Subgroups? Subpages? [[#subgroups]]%0aNo, PmWiki does not have subpages. Pm's reasons for not having subgroups are described at [[PmWiki:Hierarchical Groups]], but it comes down to not having a good page linking syntax. If you create a link or pagename like [@[[A.B.C]]@] PmWiki doesn't think of "B.C" as being in group "A", it instead thinks of "C" as being in group "AB", which is a separate group from "A". Wiki administrators can look at [[Cookbook:Subgroup Markup]] and [[Cookbook:Include With Edit]] for recipes that may be of some help with developing subgroups or subpages.%0a%0a!! Restricting the creation of new groups [[#restrictcreation]]%0aYou can set PmWiki's $GroupPattern variable to only accept the group names you want to define. For example, to limit pages to the "PmWiki", "Main", "Profiles", and "Example" groups, add the following to local/config.php:%0a%0a-> %25hlt php%25@@$GroupPattern = '(?:Site|SiteAdmin|PmWiki|Main|Profiles|Example)';@@%0a%0aWith this setting, only the listed groups will be considered valid WikiGroups. You can add more groups to the list by placing additional group names separated by pipes (|).%0a%0aSee other solutions to this at [[Cookbook:Limit Wiki Groups]] and [[Cookbook:New Group Warning]].%0a%0a!! FAQ [[#faq]]%0a>>faq%3c%3c%0aQ: How can I get rid of the 'Main' group in urls for pages pointing to Main?%0a%0aA: See [[Cookbook:Get Rid Of Main]].%0a%0aQ: How can I limit the creation of new groups?%0a%0aA: See [[Cookbook:Limit Wiki Groups]].%0a%0aQ: Why doesn't [=[[St. Giles and St. James]]=] work as a link? (It doesn't display anything.)%0a%0aA: Because it contains periods, and destroys PmWiki's file structure, which saves pages as [=Group.PageName=]. Adding those periods disrupts this format. Links may only contain words. If you need a link precisely as shown, the page must be named eg StGilesAndStJames then you can use the %25pmhlt%25[@(:title:)@] directive to have the page's title appear with periods [@(:title St. Giles and St. James:)@]. (Although in US grammar the period is often omitted and in UK grammar the period [[https://en.wikipedia.org/wiki/Abbreviation|must be]] omitted for contractions like St).%0a%0aQ: How can I delete a wiki group?%0a%0aA: Normally you can't, as this requires an admin with server-side access to delete the file that makes up the group's @@RecentChanges@@ page. But there is an option method of making it possible to delete @@RecentChanges@@ pages from within the wiki if the admin enables the code found on [[Cookbook:RecentChanges Deletion]].%0a%0aQ: How can I delete a wiki group's @@Group.RecentChanges@@ page?%0a%0aA: Normally you can't, as this requires an admin with server-side access to delete a file. But there is an optional method of making it possible to delete @@RecentChanges@@ pages from within the wiki if the admin enables the code found on [[Cookbook:RecentChanges Deletion]].%0a%0aQ: Can I delete a wiki group inside @@wiki.d@@ folder on the server to eliminate the group?%0aA: Yes, if you delete all files named @@YourGroup.*@@, the pages from that group will be removed from the wiki. Note that the documentation (group @@PmWiki@@) and the site configuration (groups @@Site@@ and @@SiteAdmin@@) that exist in the default installation, are located in @@wikilib.d@@ and not in @@wiki.d@@, and some recipes provide files located in a @@wikilib.d@@ subdirectory in the cookbook directory. (You shouldn't delete the groups @@Site@@ and @@SiteAdmin@@, they are required for normal function.)%0a%0aQ: How can I list all pages in a WikiGroup?%0aA: In a wiki page use %25pmhlt%25[@(:pagelist group=GroupName list=all:)@] or in a search box type @@GroupName/ list=all@@.
10 time=1659950011