Tag archives for tag

HtmlHelper::tag() method in CakePower

CakePower extends CakePHP’s HtmlHelper without change it’s API. This way you can enjoy powerful functionalities without to change helper names in your sources.

The standard CakePHP code:

$p1 = $this->Html->tag( 'p', 'content of first P' );
$p2 = $this->Html->tag( 'p', 'content of second P', array( 'class'=>'second' ));
echo $this->Html->tag( 'div', $p1.$p2, array( 'class'=>'container' ));

Enjoy CakePower:

echo $this->Html->tag(array(
    'name' => 'div',
    'class' => 'container',
    'content' => array(
        array(
            'name' => 'p',
            'content' => 'content of first P'
        ),array(
            'name' => 'p',
            'class' => 'second',
            'content' => 'content of second P'
        )
    )
));

Continue reading »

Posted in CakePHP | 2 Comments

Swedish Greys - a WordPress theme from Nordic Themepark.