Skip to content

Pvl Checkif is an ExpresionEngine plugin that checks if a value is in a list (default separator: |) or if it isn't. This plugin can also check if a module or extension is installed.

Notifications You must be signed in to change notification settings

pvledoux/Pvl_checkif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

#Pvl CheckIf

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

This plugin can also check if a module or extension is installed.

##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"}

Yes Sir!

{else}

No Sir!

{/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"}

Yes Sir!

{else}

No Sir!

{/exp:pvl_checkif}

###Check if a module is installed: {exp:pvl_checkif:module is_installed="playa"}

Playa is installed

{/exp:pvl_checkif:module}

###Check if a extension is installed: {exp:pvl_checkif:extension is_installed="Mo_variables"}

Mo' Variables is installed

{/exp:pvl_checkif:extension}

##Release logs

###v0.6

  • check if module or extension is installed
  • coded refactored
  • copyright updated

###v0.5

  • Improved preformance by adding static cache when parsing global variables

###v0.4

###v0.3

  • Added "contains" parameter
  • Added {else}

About

Pvl Checkif is an ExpresionEngine plugin that checks if a value is in a list (default separator: |) or if it isn't. This plugin can also check if a module or extension is installed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages