[pmwiki-users] $pagename minus the first 9 characters. is this possible?

Kathryn Andersen kat_lists at katspace.homelinux.org
Sun Mar 25 16:55:09 CDT 2007


On Sun, Mar 25, 2007 at 06:52:17PM +0100, Stealth wrote:
> my pages are show as Group.yyyymmdd-title is there a markup i have 
> missed that will let me display this as just Title, by using a Page list.

Two more suggestions:

1)
Use the {$BaseName} page variable; this is set up by giving a basename
pattern in your local/config.php file:

// The pattern for figuring out the basename of a page
$BaseNamePatterns['/^\d*-/'] = '';

(see the bottom of http://www.pmwiki.org/wiki/PmWiki/PageTextVariables)

2)
If you happen to be using Cluster
http://www.pmwiki.org/wiki/Cookbook/Cluster

then you can use the $n1, $n2 page variables (since the '-' is used as a
separator)

So, in your case, the bit of the page-name you're interested in is the
second one, so you would use {$n2}

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