On Fri, May 10, 2013 at 11:31 PM, Mark Lee <mark.lee....@gmail.com> wrote:
> The next thing I want to do is add this feature to my skin. I have already > played around with my skin.tmpl file, but I am not sure how to do this > conditional markup. > Specifically: > 1. If the page is in the Plant group, and the (:plant ... :) markup > is used on the page, then include the garden map. > 2. If I don't use the (:plant ... :) markup, the garden map is not > included. > Is this possible? > Simply set a global in your (:plant ...:) markup and then check the value of that global before you include the garden map. If you are using (:include ...:) to include your map then the global you will set will be in $FmtPV so that you have access to a page variable. Don't forget your "global" declaration of the variable at the top of the function and see http://www.pmwiki.org/wiki/PmWiki/OtherVariables to see some special notes on quoting for $FmtPV. (You may have to change the 2nd argument to the Markup() function of your (:plant ... :) markup in order to get it early enough in the process to work. Setting $EnableDiag=1 in config.php and then using ?action=ruleset will enable you to see exactly what order the rules will fire.) -Peter
_______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users