Plugin

EE 1
EE 2
Pvl Check If

Developer

Pv Ledoux

3rd Party (Free)

BSD 3-Clause License

Compatibility

Requirements

  • jQuery for the Control Panel

Tags

Check if a value is in a list (default separator: |) or if it isn't. You can now also check if a value is contains within an other (with the contains parameter, see examples below).

Pvl CheckIf

Pvl Checkif is an ExpresionEngine plugin that checks if a value is in a list (default separator: |) or if it isn’t.

Parameters:

     
  • value: required
  •  
  • is_in: required if is_not_in is not set
  •  
  • is_not_in: required if is_in is not set
  •  
  • contains: required if is_in or is_not_in are not set
  •  
  • separator: optional (default: |) you can change the list separator here.

value, is_in, is_not_in, *contains* parameters can be global variables, entry field value, etc.

Examples:


IS IN condition:

{exp:pvl_checkif value=“123” is_in=“1|12|123”}
<p>Yes Sir!</p>
{else}
<p>No Sir!</p>
{/exp:pvl_checkif}

IS NOT IN condition:

{exp:pvl_checkif value=“123” is_not_in=“1|12”}
<p>Yes Sir!</p>
{else}
<p>No Sir!</p>
{/exp:pvl_checkif}

CONTAINS condition:

{exp:pvl_checkif value=“123” contains=“12”}
<p>Yes Sir!</p>
{else}
<p>No Sir!</p>
{/exp:pvl_checkif}

Release logs

v0.4

     
  • Re-parse global variables stored in config files (see bug at http://expressionengine.com/bug_tracker/bug/17801)
  • Giga error when the condition is false


v0.3

     
  • Added “contains” parameter
  • Added {else}

Pvl Check If Links

This entry was last updated May 22, 2012, 4:32 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. Devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

3 Reviews:

Akwadnet 05.06.12

Rating - {addon_rating_average}

this Add-one is Awesome…

pvledoux 03.27.12

Rating - {addon_rating_average}

@E Alton: now it does!

E Alton 10.24.11

E Alton
Rating - {addon_rating_average}

Was looking for an alternative to Erik Regan’s “If Contains” and this is almost it. Would be great if it worked that way instead of only if the match is exact.