[pmwiki-devel] Page Vars - A Little Help?

Steven Leite steven_leite at kitimat.net
Fri Mar 25 04:36:28 CDT 2011


On 3/25/2011 2:13 AM, Hans wrote:
> Friday, March 25, 2011, 9:05:00 AM, Steven wrote:
>
>> So, if I were to type:*(:setpv price="$39.99":)* on a page, I should be
>> able to referencing {$price}  when I need to.
>> For example: *The price you entered was {$price}.*
> I am curious as why you don't use page text variables instead?
>
> (:price: $39.99:)
>
> The price you entered was {$:price}
>
>
> Hans

Thanks for your reply Hans.  I tried using page text variables also:

*my_function($args)
{

$html = '';

$my_vars = ParseArgs($args);

if (isset($my_vars['price']))
*

    *{
       // set page variable for 'price'
       $price = $my_vars['price'];
       $html .= "(:price: $price:)";
    }
    *

*return $html;
}*

  This also did not work for me.  I double checked my syntax.  {$:price} 
just to make sure I'm not making a typo somewhere.  Nothing works.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20110325/e1e2098a/attachment.html>


More information about the pmwiki-devel mailing list