[pmwiki-users] Re: Alt. default way to generate page title from page name
chr at home.se
chr at home.se
Mon Jan 31 17:58:29 CST 2005
On Mon, 31 Jan 2005, Patrick R. Michaud wrote:
> On Mon, Jan 31, 2005 at 10:27:51PM +0100, chr at home.se wrote:
> > On Sun, 30 Jan 2005, Patrick R. Michaud wrote:
> >
> > > The page name would still be GlobalWarmingMayCauseTsunami, which keeps
> > > it readable and usable in urls, filenames, configfiles, etc.
> >
> > Btw, what exactly is the page name? How would you define it? (in
> > relationsship with URIs, file names etc?) Sorry if you've answered this
> > in some other post.
Please have a look, I'm off to bed now:
http://pmwiki.org/wiki/PmWiki/Glossary
/Christian
> A "page name" is the string that PmWiki uses when referring to a page --
> i.e., it "names the page". A "full page name" consists of a group and
> a name, thus "Main.WikiSandbox". The relevant substitution variables
> are $Name, $Group, and $FullName, which for Main.WikiSandbox would be
> "WikiSandbox", "Main", and "Main.WikiSandbox".
>
> Page names don't have spaces in them. PmWiki's default settings
> capitalize each word in a page's name.
>
> In contrast, a "page link" is something that is used to generate a
> link to a page. For example, [[wiki sandbox]], [[(wiki) sandbox]],
> WikiSandbox, Main/WikiSandbox, [[Main/wiki sandbox]],
> [[Main.WikiSandbox | click here]], etc. can all be ways of specifying
> a link to the page 'Main.WikiSandbox'. In each case PmWiki uses the
> context of the link to generate a page name from the page link --
> normally by capitalizing each word found in the link and stripping
> any characters that aren't considered valid in page names.
>
> Page names are used in uris to tell PmWiki which page is to be loaded
> or acted upon. The normal form of uris is usually either
>
> http://www.example.com/pmwiki/pmwiki.php?n=Main.WikiSandbox
> http://www.example.com/pmwiki/pmwiki.php/Main/WikiSandbox
>
> Various uri aliasing and rewriting tricks can be played, but PmWiki
> still ultimately expects to obtain a page name from either the 'n'
> uri parameter or from the PATH_INFO component following the script uri.
> PmWiki gives preference to the ?n= parameter if it's supplied.
>
> "File names" are normally built directly from page names. For example,
> PmWiki's default page storage mechanism uses a page's name as the name
> of its corresponding file in wiki.d/ . For case-sensitive filesystems
> this means that "Main.WikiSandbox" is a different page from
> "Main.Wikisandbox", on case-insensitive filesystems these two would be
> considered the same page. In practice distinctions in case-handling
> at the filesystem level haven't posed challenges to getting PmWiki to
> work.
>
> The page name is also used by PmWiki for locating per-group and
> per-page customization files in the local/ subdirectory. For example,
> browsing Main.WikiSandbox would cause the local/Main.WikiSandbox.php
> and local/Main.php configuration files to be loaded.
>
> Finally, a "page title" is the author-defined title for a page,
> normally set via the (:title:) directive in the markup. If no
> (:title:) directive is supplied, then a page's title is assumed to
> be the same as the page's name. A page's title is accessed via
> either the $Title or $Titlespaced formatting variables. $Titlespaced
> differs from $Title in that it uses the spaced version of the
> name (i.e., $Namespaced) instead of $Name if no (:title:) has been set.
>
> Pm
>
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list