This extension outputs lipsum text for use as placeholder to mimic real text, but without any meaning to not distract viewer.
Usage ¶
Extract file to components or extensions and then assign it enywhere, where some text would go.
<?
// This will output 2 different lipsum paragraphs, each into different tab
$this->widget('CJuiTabs', array(
'tabs' => array(
'Privacy' => new ELipsum,
'Other' => new ELipsum,
)
));
?>
Or just to use it directly in views, simply echo
it
echo new ELipsum
Assign lipsum text to single variable
You can get lipsum text by following syntex:
$test = new ELipsum;
print $test->toString().'';
print $test->toString().'';
print $test->__toString();
You can get different different paragraphs.
Note: I have put this file in component folder.
Thanks.
Re: Assign lipsum text to single variable
The idea of
__toString()
is to not call it directly, you can just doecho new ELipsum
Fix
On line 23 of ELipsum.php
reset(self::$next);
should be
reset(self::$text);
Edit: Here's how to genere Lorem Ipsum on other languages too http://www.yiiframework.com/wiki/426/multilanguage-lorem-ipsum-text-generator/
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.