e107sk.com

Odd/even rows

When you need to have each other row displayed different way
on Wednesday 15 April 2020
comments: 0

 In theme_shorcodes: 

private $odd = false;

create new shortcode for needed class

function sc_row_odd()
{
$this->odd = !$this->odd;

return ($this->odd) ? '' : 'class= " odd " ';
}

Use it template: 

<li {ROW_ODD}>

Next examples:

Agency2 theme:

function sc_timeline_inverted()
{
$this->pairing;{{ }}{{ }}
$this->pairing = !$this->pairing;

return ($this->pairing ? '' : 'class= "timeline-inverted" ');
}

0 Comments

Other links

Follow us