[pmwiki-users] Changing the Page Action on Page Load

Peter Bowers pbowers at pobox.com
Wed Sep 1 08:34:28 CDT 2010

On Wed, Sep 1, 2010 at 1:03 PM, Bruce & Ann Reidenbach
<bereiden at gmail.com>wrote:

> Is there a way to create a default page action when a page link is
> clicked?  For example, if I create a (:pagelist index, I'd like to have the
> a specific page action automatically take place for a particular page, i.e.,
> instead of the link performing an ?action=view, it would perform an
> ?action=myaction.  The only thing I can get to work is to put the following
> link at the top of the page in question:

* Do you *always* want this action to occur whenever a certain, specific
page is loaded in view/browse mode?  In other words, Page X will always use
a special action but pages Y and Z will be non-customized, normal pmwiki

**   in MyGroup.MyPage.php:
     if ($action == 'browse') $action = 'myaction';

*  Or do you want all the links from a certain pagelist to link to the
respective pages with a special action?

**   in this case create a special template for

**   (see http://www.pmwiki.org/wiki/PmWiki/PageListTemplates and
http://www.pmwiki.org/wiki/Cookbook/PagelistTemplateSamples to get you
started on this)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100901/42b6e54a/attachment.html>

More information about the pmwiki-users mailing list