[pmwiki-users] $BaseName (was Re: pmwiki-2.2.0-beta9 release (bugfix, pagevar filters in pagelists))
Kathryn Andersen
kat_lists at katspace.homelinux.org
Tue Oct 3 07:31:30 CDT 2006
On Mon, Oct 02, 2006 at 12:43:04PM -0500, Patrick R. Michaud wrote:
> On Mon, Oct 02, 2006 at 11:32:27AM -0400, Crisses wrote:
> This is now possible in 2.2.0-beta10 (just released), using
> the new {$BaseName} page variable markup.
I'm a bit confused about what the $BaseName actually gives you, what it
actually applies to.
> Essentially, an administrator or recipe uses $BaseNamePatterns
> to define transformations from a pagename into its "base" form.
> For example, a comments recipe might define:
>
> $BaseNamePatterns['/-Talk$/'] = '';
Are the BaseNamePatterns applied to the $FullName of the page?
Or the $Name of the page?
> and then in the pagelist template to refer to the non-Data
> group regardless of source one would use things like:
>
> {=$BaseName} "Simile.XYZ"
> {{=$BaseName}$Group} "Simile"
>
I don't understand the nested { } markup -- what does that do?
> Or, to always get the Data- group regardless of source, one would use:
>
> Data-{=$BaseName} "Data-Simile.XYZ"
> Data-{{=$BaseName}$Group} "Data-Simile"
>
What if I had a page, say, "Stories-Highlander.DeadlySecrets"
Does this mean that if I had
$BaseNamePatterns['/^Stories-/'] = '';
Then the $BaseName of that page would be "Highlander.DeadlySecrets"?
What if I wanted just the "base group"? (In this case, "Highlander")
Would I be able to get that?
Kathryn Andersen
--
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
More information about the pmwiki-users
mailing list