[Pmwiki-users] pmwiki 2.0 pre-populated page question

Bryant Durrell durrell
Wed Dec 29 12:55:19 CST 2004


I just migrated to 2.0; very smooth migration and I'm thankful for all
the work that's been done to make the upgrade easy.  I do have one problem
I can't figure out.  In the old Wiki, I had the following code in 
local/Main.php:

<?php
$SessionTemplatePage = '$Group.SessionTemplate';
if ($action=="edit") {
        if (strpos($pagename, "Session")) {
                $formpage = ReadPage(FmtPageName($SessionTemplatePage,$pagename)
);
                $DefaultPageTextFmt = $formpage['text'];
        }
}
?>

What it does:  every time I edit a new page that includes the string
"Session" in the title, the contents of Main.SessionTemplate is the
default text in the edit box.  (I have an ever-increasing series of
pages entitled Session1, Session2, Session3, etc, and I don't want to
retype the common headers and so on each time.)

I can't get this to work in 2.0.  The code in pmwiki.php looks like it
works the same way.  Any idea what I might be missing?

-- 
        Bryant Durrell [] http://www.innocence.com/~durrell [] 9/11/2001
 [----------------------------------------------------------------------------]
     "However, never daunted, I will cope with adversity in my traditional
                 manner...sulking and nausea."  -- Tom K. Ryan



More information about the pmwiki-users mailing list