breakup Section::show()
This commit is contained in:
parent
9eba121339
commit
f512e3df40
|
@ -61,6 +61,19 @@ class Section extends Widget
|
|||
array('id' => $this->divId(),
|
||||
'class' => 'section'));
|
||||
|
||||
$this->showTitle();
|
||||
|
||||
$have_more = $this->showContent();
|
||||
|
||||
if ($have_more) {
|
||||
$this->showMore();
|
||||
}
|
||||
|
||||
$this->out->elementEnd('div');
|
||||
}
|
||||
|
||||
function showTitle()
|
||||
{
|
||||
$link = $this->link();
|
||||
if (!empty($link)) {
|
||||
$this->out->elementStart('h2');
|
||||
|
@ -70,10 +83,10 @@ class Section extends Widget
|
|||
$this->out->element('h2', null,
|
||||
$this->title());
|
||||
}
|
||||
}
|
||||
|
||||
$have_more = $this->showContent();
|
||||
|
||||
if ($have_more) {
|
||||
function showMore()
|
||||
{
|
||||
$this->out->elementStart('p');
|
||||
$this->out->element('a', array('href' => $this->moreUrl(),
|
||||
'class' => 'more'),
|
||||
|
@ -81,9 +94,6 @@ class Section extends Widget
|
|||
$this->out->elementEnd('p');
|
||||
}
|
||||
|
||||
$this->out->elementEnd('div');
|
||||
}
|
||||
|
||||
function divId()
|
||||
{
|
||||
return 'generic_section';
|
||||
|
|
Loading…
Reference in New Issue
Block a user