[pmwiki-users] Naming-convention, problems with links

H. Fox haganfox at users.sourceforge.net
Fri Apr 28 09:45:43 CDT 2006


On 4/28/06, Daniel Hofer <daho at borntofly.ch> wrote:
> Hello again
>
> I asked some days ago but didn't received an answer.
> I try it again and hope anybody has a similar problem;-)
[snip]
> question:
> is there a chance to remove this last digit (problem: could also be
> two-digit) to get the right link?

   $pagename = ResolvePageName($pagename);
   $name = PageVar($pagename, '$Name');
   $FmtPV['$NameMinus1'] = "'".substr($name, 0, -1)."'";
   $FmtPV['$NameMinus2'] = "'".substr($name, 0, -2)."'";

gives you {$NameMinus1} and {$NameMinus2} page variables.

Hagan




More information about the pmwiki-users mailing list