We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

fetch_params returns "yes" instead of "y" and "on" (and "no" instead of "n" or "off")

Development and Programming

Michael Rog's avatar
Michael Rog
179 posts
about 16 years ago
Michael Rog's avatar Michael Rog
$my_string = $this->EE->TMPL->fetch_param('my_param') ;
{exp:my_pi my_param="y"} tagdata {/exp:my_pi}

If my_param is “y” or “on” then $my_string evaluates to “yes”.

If my_param is “n” or “off” then $my_string evaluates to “no”.

If my_param is “N” or “Y” or “ON” or “OFF” or anything else then $my_string evaluates to my_param.

Is this the intended behavior? Is there any way to turn it off so EE won’t mess with my parameter strings?

       
Michael Rog's avatar
Michael Rog
179 posts
about 16 years ago
Michael Rog's avatar Michael Rog

Confirmed with Robin: This is intended behavior.

(https://support.ellislab.com/bugs/detail/12427/)

Hopefully it shows up in the docs soon.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.