Skip to content

Commit

Permalink
Better example in readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
kahwee committed Feb 20, 2012
1 parent 32ced61 commit 1eaa770
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions protected/extensions/kcolumns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@ Usage as part of column in `CGridView`:
```php
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $model->search(),
'columns' => array(
array(
'class' => 'ext.kcolumns.KHtmlPurifierColumn',
'name' => 'content',
'options' => array(
'HTML.AllowedElements' => array('i', 'em', 'strong', 'b', 'sup', 'sub'),
),
'truncate_length' => 200, #Number of characters limit for truncation.
'truncate_suffix' => '&hellip;', #Ellipses
),
array(
'name' => 'id',
),
),
'dataProvider' => $model->search(),
'columns' => array(
array(
'class' => 'ext.kcolumns.KHtmlPurifierColumn',
'name' => 'content',
'options' => array(
'HTML.AllowedElements' => array('i', 'em', 'strong', 'b', 'sup', 'sub'),
'HTML.AllowedAttributes' => array(),
),
'truncate_length' => 200, #Number of characters limit for truncation.
'truncate_suffix' => '&hellip;', #Ellipses
),
array(
'name' => 'id',
),
),
));
```

Expand Down

0 comments on commit 1eaa770

Please sign in to comment.