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

Three segment tag pairs

Development and Programming

Billy Patel's avatar
Billy Patel
284 posts
16 years ago
Billy Patel's avatar Billy Patel

I have read the docs regarding three segments and tag pairs.

I want to make use of both like so:

class Myutils {

    var $return_data;
    function cleanstring()
    {
        global $TMPL, $FNS;

           $str = $TMPL->tagdata;

    $str = strtoupper($str);

    $this->return_data = $str;

    }

function usage()
{
ob_start();
?>
TBC
<?php
$buffer = ob_get_contents();

ob_end_clean();


return $buffer;
}
/* END */


}
// END CLASS
?>

As i go on, i want to add functions to this plugin for personal use. Problem is that when i use it, i can echo the returned uppercase string, but it doesnt get returned to the calling template. The calling template returns nothing,

{exp:myutils:cleanstring}my lower case string{/exp:myutils:cleanstring}

Am i doing something wrong?

       
Billy Patel's avatar
Billy Patel
284 posts
16 years ago
Billy Patel's avatar Billy Patel

Ah, i copied the code from word_limit. Works a treat.

Thanks

       

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.