Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8497853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:14:36+00:00 2026-06-11T00:14:36+00:00

The point is to remove from CListView render, those two divs: <div id=yw0 class=list-view>

  • 0

The point is to remove from CListView render, those two divs:

<div id="yw0" class="list-view">
<div class="items">

I’ve been looking here:

https://github.com/yiisoft/yii/blob/master/framework/zii/widgets/CBaseListView.php#L123

But I found nothing related with those two divs there.

Can anyone please share, what should we extend in order for make this a reality ?

Here’s an update of the desired output:

<div>
  <article class="itemthing">
    list data
  </article>
  <article class="itemthing">
    list data
  </article>
  <article class="itemthing">
    list data
  </article>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:14:38+00:00Added an answer on June 11, 2026 at 12:14 am

    You’d be better off extending from CListView itself, but write new implementations for run() method in CBaseListView and a new implementation for the renderItems() method in CListView, for example:

    Yii::import('zii.widgets.CListView');
    class MListView extends CListView{
        public function run(){
                $this->registerClientScript();
                // this line renders the first div
                //echo CHtml::openTag($this->tagName,$this->htmlOptions)."\n"; 
    
                $this->renderContent();
                $this->renderKeys();
    
                //echo CHtml::closeTag($this->tagName);
        }
    
        public function renderItems(){
                //this line renders the second div
                //echo CHtml::openTag($this->itemsTagName,array('class'=>$this->itemsCssClass))."\n"; 
                // copy original code from the function
                //echo CHtml::closeTag($this->itemsTagName);
        }
    }
    

    Edit:

    Be aware that some of the default clistview functionality will not work with only this much, because the jquery.yiilistview.js will not work without an id, that identifies this listview.

    Edit:

    From your updated question, you can do this, then:

    <div id="some-id">
    <?php
        $this->widget('ext.extendedwidgets.MListView',array(
            'id'=>'some-id', // same id you specified in the div
            //... rest of it
            'template' => '{items}', // as seen in the chat below
        ));
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the following example I remove from list some elements in the range for
I'm trying to remove the 2nd commit to a repo. At this point I
If I switch GL_QUADS to GL_TRIANGLES and remove the last point, the triangle renders
my CGPathRef has 5 elements, i want to remove the starting point , and
Is it possible to efficiently insert or remove bytes from the middle of a
I'm trying to create a small web app that is used to remove items
Is there an easy way in Common Lisp to merge two plists? Or from
I have two activities one displaying map view and another listview, the main objective
Is there an elegant way to remove characters from a string? For instance, how
Problem appears when I want to remove element from paginated table in ajaxized way.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.