content_image tag

   Purpose

This plugin allows template designers to prompt users to select an image file when editing the content of a page. It behaves similarly to the content plugin, for additional content blocks.

   How to use?

Just insert the tag into your page template like:

{content_image block='image1'}

   Available parameters

  • block (required) - The name for this additional content block.
  • label - A label or prompt for this content block in the edit content page. If not specified, the block name will be used.
  • priority - Allows specifying an integer priority for the block within the tab.
  • dir - The name of a directory (relative to the uploads directory, from which to select image files. If not specified, the content_image preference in the https://docs.cmsmadesimple.org/configuration/global-settings page will be used. If that preference is empty the uploads path will be used.
  • class - The css class name to use on the img tag in frontend display.
  • default - Use to set a default image used when no image is selected
  • id - The id name to use on the img tag in frontend display.
  • name - The tag name to use on the img tag in frontend display.
  • width - The desired width of the image (in pixels).
  • height - The desired height of the image (in pixels).
  • alt - Alternative text if the image cannot be found.
  • urlonly - output only the url to the image, ignoring all parameters like id, name, width, height, etc.
  • tab - The desired tab to display this field on in the edit form.
  • exclude - Specify a prefix of files to exclude. i.e: "thumb_"
  • sort - optionally sort the options. Default is to not sort.
  • assign (string) - Assign the results to a Smarty variable with that name.