News

Most web sites have a section for the latest news. In CMS Made Simple the best way to accomplish that is by using the News module.

To display a list of news items you insert the tag:

{news number='5' category='General'}

There are a number of parameters that can be used in conjunction with this tag. To read about how a module is used, navigate to Extensions » Modules in the Admin Panel and click on "Help" for the module you want to read about.

   Parameters

  • pagelimit - Maximum number of items to display (per page). If this parameter is not supplied all matching items will be displayed. If it is, and there are more items available than specified in the parameter, text and links will be supplied to allow scrolling through the results
  • browsecat - Shows a browseable category list.
  • showall - Show all articles, irrespective of end date
  • showarchive - Show only expired news articles.
  • sortasc - Sort news items in ascending date order rather than descending.
  • sortby - Field to sort by. Options are: "news_date", "summary", "news_data", "news_category", "news_title", "news_extra", "end_time", "start_time", "random". Defaults to "news_date". If "random" is specified, the sortasc param is ignored.
  • detailpage - Page to display News details in. This can either be a page alias or an id. Used to allow details to be displayed in a different template from the summary.
  • detailtemplate - Use a separate database template for displaying the article detail. This template must exist and be visible in the detail template tab of the News admin, though it does not need to be the default. If this parameter is not specified, then the current template marked as default will be used.
  • summarytemplate - Use a separate database template for displaying the article summary. This template must exist and be visible in the summary template tab of the News admin, though it does not need to be the default. If this parameter is not specified, then the current template marked as default will be used.
  • formtemplate - Use a database template for displaying the article submission form. This template must exist and be visible in the form templates tab of the News admin, though it does not need to be the default. If this parameter is not specified, then the current template marked as default will be used.
  • browsecattemplate - Use a database template for displaying the category browser. This template must exist and be visible in the Browse Category Templates tab of the News admin, though it does not need to be the default. If this parameter is not specified, then the current template marked as default will be used.
  • moretext - Text to display at the end of a news item if it goes over the summary length. Defaults to "More"
  • category - Used in the summary view to display only items for the specified categories. Use * after the name to show children.Multiple categories can be used if separated with a comma. Leaving empty, will show all categories. This parameter also works for the frontend submit action, however only a single category name is supported.
  • number - Maximum number of items to display (per page) -- leaving empty will show all items. This is a synonym for the pagelimit parameter.
  • start - Start at the nth item -- leaving empty will start at the first item.
  • action - 'Override the default action. Possible values are:
    • "detail" - to display a specified articleid in detail mode.
    • "default" - to display the summary view
    • "fesubmit" - to display the frontend form for allowing users to submit news articles on the front end. Add the {cms_init_editor}tag in the metadata section to initialize the selected wysiwyg editor. (Site Admin >> Global Settings)
    • "browsecat" - to display a browseable category list.
  • articleid - This parameter is only applicable to the detail view. It allows specifying which news article to display in detail mode. If the special value -1 is used, the system will display the newest, published, non expired article.