<div class="gmail_quote">On Wed, Sep 1, 2010 at 1:03 PM, Bruce & Ann Reidenbach <span dir="ltr"><<a href="mailto:bereiden@gmail.com">bereiden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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:<br>
</blockquote><div> </div><div>* 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 pages?</div>
<div><br></div><div>** in MyGroup.MyPage.php:</div><div> [@</div><div> if ($action == 'browse') $action = 'myaction'; </div><div> @]</div><div><br></div><div>* Or do you want all the links from a certain pagelist to link to the respective pages with a special action? </div>
<div><br></div><div>** in this case create a special template for fmt=#MyCustomizedFmtWithMySpecialAction</div><div><br></div><div>** (see <a href="http://www.pmwiki.org/wiki/PmWiki/PageListTemplates">http://www.pmwiki.org/wiki/PmWiki/PageListTemplates</a> and <a href="http://www.pmwiki.org/wiki/Cookbook/PagelistTemplateSamples">http://www.pmwiki.org/wiki/Cookbook/PagelistTemplateSamples</a> to get you started on this)</div>
<div><br></div><div>-Peter</div></div><br>