• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple, the Netherlands

cms_stylesheet tag

We need your assistance to make the documentation accurate, user friendly and understandable. Therefore we welcome any tips or suggestions regarding documentation. Thank you in advance for your contribution.

However, we will not respond to technical support questions submitted using this form. If you are having difficulty with CMSMS and cannot find the solution on this website, please submit your question appropriately on our support forum at: http://forum.cmsmadesimple.org. Please remember to follow the forum rules when posting.


This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net) Please confirm that you are not a script by entering the letters from the image

Open anchor to this point in the page Purpose

A replacement for the {stylesheet} tag, this tag provides caching of css files by generating static files in the tmp/cache directory, and smarty processing of the individual stylesheets.

This plugin retrieves stylesheet information from the system. By default, it grabs all of the stylesheets attached to the current template in the order specified by the designer, and combines them into a single stylesheet tag.

Generated stylesheets are uniquely named according to the last modification date in the database, and are only generated if a stylesheet has changed.

Open anchor to this point in the page How to use?

Just insert the tag into your template/page's head section like:

  1. {cms_stylesheet}

Open anchor to this point in the page Available parameters

  • name - Instead of getting all stylesheets for the given page, it will only get one specifically named one, whether it's attached to the current template or not.
  • nocombine - If set to a non zero value, and there are multiple stylesheets associated with the template, the stylesheets will be output as separate tags rather than combined into a single tag.
  • nolinks - Used to output only href to Stylesheet file instead of full tag. This is useful if you want to use @import in your Stylesheet or customize the inclusion of Styles in your Template.
  • https - (boolean) indicates wether the ssl_url config entry should be used to prefix stylesheet urls. If not specified, the system will attempt to determine the proper root url based on the secure flag of the page being displayed.
  • templateid - If templateid is defined, this will return stylesheets associated with that template instead of the current one.
  • media - When used in conjunction with the name parameter this parameter will allow you to override the media type for that stylesheet. When used in conjunction with the templateid parameter, the media parameter will only output stylesheet tags for those stylesheets that are marked as compatible with the specified media type.

Open anchor to this point in the page Syntax examples

  1. {cms_stylesheet name="IE"}

Open anchor to this point in the page Smarty Processing

This section has been moved to the Stylesheets page.

Open anchor to this point in the page Using Media Queries

This section has been moved to the Stylesheets page.