select view
CommandOrder by:  Command

else

{joodb else}
thumb

Else negates the current output condition. {joodb else} must be in between an {joodb ifis} and {joodb endif} command.

Example

{joodb ifis|in_stock}
  • You can buy this product. {joodb field|in_stock} Unities are availiable
{joodb else}
  • This product is sold out
{joodb endif}

Prints a waring no more products are available.

endif

{joodb endif}
thumb

Endif ends an Ifis condition and enables the output regardless of the current condition.

Example

{joodb ifis|color|red}
  • The color is red like a firewagon
{joodb endif}

Prints a color definition.

ifis

{joodb ifis|FIELDNAME|[value]|[cond]}
thumb

Compares whether a condition is valid or not and stops or continues output. Without any value or condition the content of FIELDNAME is tested for empty,false,zero or negative.

Parameters 

  • FIELDNAME - Name of a field in your database
  • value (optional) - An integer or string value
  • cond (optional) - The condition to test for
    Valid conditions are
    • eq (default) - Fieldcontent is equal value
    • ne - Fieldcontent is  not equal value
    • lt - Fieldcontent is lower than value
    • gt - Fieldcontent is greater than value
    • le - Fieldcontent is lower or equal value
    • ge - Fieldcontent is greater or equal value

Example

{joodb ifis|price|100|ge}
  • This item is rather expensive
{joodb else}
  • The price is less than 100 $
{joodb endif}

Compares whether the value of the field price is more then 100 $ ...

Since version 3.9.9pro you are able to compare multiple values and use conditions like "&&" and "||".

This feature is still experimental!

Example

{joodb ifis|price|10|lt || special_price && print_price_info}
  • This price is lower as 10$ OR it's a special price AND we can output the price info!
{joodb endif}

Instead of "&&" or "||" you can use "and" and "or"

Notes

  • {joodb ifnot} is deprecated. Use ifis with the "ne" condition.
  • If value is a string, ifis is testing the alphabethical order.

ifnot

{joodb ifnot}
thumb

Ifnot tests FIELDNAME empty,false,zero or negative and discontinues output if the content is positive or filled.

Example

{joodb ifnot|in_stock}
  • This product is sold out
{joodb else}
  • You can buy this product. {joodb field|in_stock} units are available
{joodb endif}

Print a waring no more products are available.

Notes

  • {joodb ifnot} is deprecated. Use ifis with the "ne" condition.

Results 1 - 4 of 4