Plugin

EE 1
EE 2
Modulo Operator

Developer

Brilliant2 - David Dexter

3rd Party (Free)


Compatibility

  • LG Addon Updater
  • Multi Site Manager
  • Stand Alone Entry Form

Requirements

  • jQuery for the Control Panel

Tags

This plugin calculates the modulo value. In computing, the modulo operation finds the remainder of division of one number by another.

Given two numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as a mod n) is the remainder, on division of a by n. For instance, the expression “7 mod 3” would evaluate to 1, while “9 mod 3” would evaluate to 0. Although typically performed with a and n both being integers, many computing systems allow other types of numeric operands.

Parameters

1) Dividend (required)
2) Divisor (required)

{exp:modulo dividend="dividend" divisor="divisor"}

For example:

bc. {exp:modulo dividend=“3” divisor=“3”} => 0
{exp:modulo dividend=“4” divisor=“3”} => 1
{exp:modulo dividend=“5” divisor=“3”} => 2
{exp:modulo dividend=“6” divisor=“3”} => 0

Modulo Operator Links

This entry was last updated August 8, 2011, 8:57 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!

1 Review:

ejaeDesign 06.06.11

ejaeDesign

54321

If you need to output a class or content per every x entry, this is a perfect way to do so without enabling PHP for the template.

Although it’s marked as a EE 1 plugin, it works perfectly with EE 2.1.3!