GDmac / Switchee

Switch/case control structure for ExpressionEngine templates

Home Page:http://expressionengine.com/forums/viewthread/145805/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch/case control structure for templates
-------------------------------------------

With EEs if/else conditionals, each condition is parsed before  being removed at the end of the parsing process. This means if you wrap if/else tags around lots of other tags then your template will be running many unnecessary queries and functions.

As Switchee is a tag we can use parse=“inward” to ensure that unmatched conditions are not parsed before being removed from the template.

* Allows multiple case values separated by pipe ‘|’.
* Supports regular expression matching like so: #regex#
* Multiple regular expressions separated by | can be used for one case value
* Supports empty string matches represesnted by ‘’ or “”

Developers: 
If you wish to develop the EE 1.6.x compatible version of this plugin, please use the 1.6 branch. Use the master branch for EE 2.x.

About

Switch/case control structure for ExpressionEngine templates

http://expressionengine.com/forums/viewthread/145805/


Languages

Language:PHP 100.0%