output_format_list — Get an HTML list of output formats for the current action.

OutputFormat-related functions

Summary

output_format_list($list = true, $delimiter = ', ')

Get an HTML list of output formats for the current action.

Parameters:
  • $list (bool) – If true or omitted, return an unordered list, if false, return a simple string list using the delimiter.

  • $delimiter (string) – If the first argument is false, use this as the delimiter for the list.

Returns:

string|bool HTML

Usage

Examples

Use output_format_list to control how the list of outputs is generated. Use true to output as an unordered list (<ol>).

<?php echo output_format_list(true); ?>

Use false to output as a string. While the default delimiter is a comma, this can be overwitten using the $delimiter parameter.

<?php echo output_format_list(false, ' | '); ?>

See Also