public function renderItems()
    {
        $thumbnails = array();
        $data = $this->dataProvider->getData();

        if (!empty($data)) {
            $owner = $this->getOwner();
            $render = $owner instanceof CController ? 'renderPartial' : 'render';
            foreach ($data as $i => $row) {
                $thumbnail = array();
                $d = $this->viewData;
                $d['index'] = $i;
                $d['data'] = $row;
                $d['widget'] = $this;
                $thumbnail['caption'] = $owner->$render($this->itemView, $d, true);
                if (isset($this->url)) {
                    $thumbnail['url'] = $this->evaluateExpression($this->url, array('data' => $row));
                }
                if (isset($this->span)) {
                    $thumbnail['span'] = $this->span;
                }
                $thumbnails[] = $thumbnail;
            }
            echo TbHtml::thumbnails($thumbnails, $this->htmlOptions);
        } else {
            $this->renderEmptyText();
        }
    }