Hello …
I would first like to congratulate all the creators of the framework.
I have a question: Already searched the forum but found no answer.
I would change the text of which shows the CGridView number records:
‘Displaying 1-1 of 1 result (s)’
Can anyone help me?
mdomba
(Maurizio Domba Cerin)
December 18, 2010, 6:39pm
3
Can you explain how would you like to change it?
Anyway the summary is rendered by the renderSummary() method - http://www.yiiframework.com/doc/api/1.1/CBaseListView#renderSummary-detail
NOTE: You can check the source of the method there…
mdomba
(Maurizio Domba Cerin)
December 18, 2010, 6:41pm
4
No problem - moved to "general discussion for Yii 1.1.x"
Hello mdomba.
I’m Brazilian, and some days I’m looking for a framework to use in my projects.
Yii is really surprising me with so many features and ease of maintenance.
With the help of your response, I saw that there is an attribute called "summaryText". Only I configured it and it solved my problem.
Thank you.
Congratulations again.
mdomba
(Maurizio Domba Cerin)
December 18, 2010, 7:22pm
6
Glad you solved it…
And welcome to the world of Yii
5mbytes
(Victor)
March 31, 2011, 12:22am
7
Hi.
I found, how to change text via
'summaryText' => '...'
but what if I want to disable any summary text? I can fill summaryText with empty string but I still can see empty
<div class="summary"></div>
in output html. Is there a method to remove this div? Thanks.
Edit: My current code is
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider' => $dataProvider,
'itemView' => '_view',
'enablePagination' => false,
'summaryText' => '',
)); ?>
tri
(tri - Tommy Riboe)
March 31, 2011, 12:30am
8
Define a template property value not containing {summary}.
/Tommy
5mbytes
(Victor)
March 31, 2011, 1:48am
9
Thanks, it works!
One more question about CBaseListView. I can see hidden div with keys. It renders in renderKeys(), call of this function is in run(). As I see in sources, I can’t remove this div. So I have a question: what is this keys div for?
ignition25
(Malcolm Ong)
April 20, 2011, 9:08pm
10
5mbytes:
Thanks, it works!
One more question about CBaseListView. I can see hidden div with keys. It renders in renderKeys(), call of this function is in run(). As I see in sources, I can’t remove this div. So I have a question: what is this keys div for?
Did you ever figure out how to ‘turn off’ the renderKeys? I, too, don’t want it to be rendering a hidden div
mdomba
(Maurizio Domba Cerin)
April 21, 2011, 11:05am
11
The keys DIV is needed by the jQuery script behind CDetailView and CGridView… it holds primary keys for the displayed data…