Zend Framework

AccordionContainer::getElementHtmlTemplate()

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.1
  • Fix Version/s: 1.9.3
  • Component/s: ZendX_JQuery
  • Labels:
    None

Description

Valid html template for current UI accordion is:

$this->_elementHtmlTemplate = '<h3><a href="#">%s</a></h3><div>%s</div>';

Without <h3> tag UI is broken with default settings... Also it would be great if you provide functionality for changing <h3> tag or elementHtmlTemplate (via decorators or something else).

Activity

Hide
Gregory Wilson added a comment -

Verified here on 1.9.2 as well. Please commit this simple change.

Show
Gregory Wilson added a comment - Verified here on 1.9.2 as well. Please commit this simple change.
Hide
Benjamin Eberlei added a comment -

Fixed in trunk and merged into 1.9 release branch. Added way to change HTML Template:

public function testAccordionSetHtmlTemplate()
    {
        $this->view->getHelper('accordionContainer')->setElementHtmlTemplate("<h3>%s</h3><p>%s</p>");

        $this->view->accordionPane("container1", "foo", array('title' => 'foo'));
        $accordion = $this->view->accordionContainer("container1", array(), array());

        $this->assertEquals(
            '<div id="container1">
<h3>foo</h3><p>foo</p>
</div>
',
            $accordion
        );
    }
Show
Benjamin Eberlei added a comment - Fixed in trunk and merged into 1.9 release branch. Added way to change HTML Template:
public function testAccordionSetHtmlTemplate()
    {
        $this->view->getHelper('accordionContainer')->setElementHtmlTemplate("<h3>%s</h3><p>%s</p>");

        $this->view->accordionPane("container1", "foo", array('title' => 'foo'));
        $accordion = $this->view->accordionContainer("container1", array(), array());

        $this->assertEquals(
            '<div id="container1">
<h3>foo</h3><p>foo</p>
</div>
',
            $accordion
        );
    }

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: