I have mastered some parts of extending pmWiki markup, but there is one simple case that I can&#39;t seem to get to work.<br><br>In a travelog that has navigation between pages, I have been laboriously copying the same code at the top and bottom of each pakge and then modifying it so that there is a previous day and next day link.&nbsp; The wiki code is something like:
<br><br><div style="margin-left: 40px;">||[[Main.MonFeb05|&lt;- Monday, February 5]] ||  [[Main.WedFeb07|Wednesday, February 7 -&gt;]]||<br></div><br>I have gotten tired of this copying and so I decided to create what I think of as a macro to generate the pmWiki language code from a short directive:
<br><br>(:navprevnext Feb6:)<br><br>the code that I have added to my config.php file is:<br><br><div style="margin-left: 40px;">## NAVPREVNEXT<br>Markup(&#39;navprevnext&#39;, &#39;fulltext&#39;, &#39;/\\(:navprevnext +(.*?):\\)/e&#39;, &quot;GenerateNavPrevNextCode(&#39;$1&#39;)&quot;);
<br>function GenerateNavPrevNextCode($DateStr)<br>{<br>&nbsp; $date = strtotime($DateStr);<br>&nbsp; $prev = $date - 86400;<br>&nbsp; $next = $date + 86400;<br><br>&nbsp; $result = &quot;||[[Main.&quot; . date(&quot;DMd&quot;,$prev) . &quot;|&lt;- &quot; . date(&quot;l, F j&quot;, $prev) . &quot;]] ||&nbsp; [[Main.&quot; . date(&quot;DMd&quot;,$next) . &quot;|&quot; . date(&quot;l, F j&quot;, $next) . &quot; -&gt;]]||&quot;;
<br><br>&nbsp; return Keep($result);<br>}<br></div><br clear="all">The problem is that the pmWiki markup appears, not the interpretation of the markup.<br><br>Can anybody suggest what I am doing wrong?&nbsp; I think I have tried every different &quot;when&quot; setting with no success.
<br><br>Thanks,<br><br>&nbsp;&nbsp;&nbsp;&nbsp; Harry<br><br>-- <br>Harry Forsdick<br>781.861.6149 (home)&nbsp;&nbsp;781.799.6002 (cell)<br><a href="http://www.forsdick.com">http://www.forsdick.com</a><br><a href="http://forsdick.blogspot.com">http://forsdick.blogspot.com
</a><br><a href="http://www.lexdig.com">http://www.lexdig.com</a>