News module entry object reference:
The News module's detail view exports the following variables:
- $entry - A simple object that contains information about the one entry.
- $category_name - (string) the category name for the category that this article belongs to.
- $category_link - (string) (deprecated) A link to a summary view for articles in this category.
$entry Object Reference
- id (integer) - The unique article id.
- author_id (integer) - The userid of the author who created the article. This value may be negative to indicate an FEU userid.
- title (string) - The title of the article.
- summary (text) - The summary text (may be empty or unset).
- extra (string) = The "extra" data associated with the article (may be empty or unset).
- news_url (string) = The url segment associated with this article (may be empty or unset).
- postdate (string) = A string representing the news article post date. You may filter this through cms_date_format for different display possibilities.
- startdate (string) = A string representing the date the article should begin to appear. (may be empty or unset).
- enddate (string) = A string representing the date the article should stop appearing on the site (may be empty or unset).
- category_id (integer) = The unique id of the hierarchy level where this article resides (may be empty or unset)
- status (string) = either 'draft' or 'published' indicating the status of this article.
- author (string) = The username of the original author of the article. If the article was created by frontend submission, this will attempt to retrieve the username from the FEU module.
- authorname (string) = The full name of the original author of the website. Only applicable if article was created by an administrator and that information exists in the administrators profile.
- category (string) = The name of the category that this article is associated with.
- canonical (string) = A full URL (prettified) to this articles detail view using defaults if necessary.
- fields (associative) = An associative array of field objects, representing the fields, and their values for this article. See the information below on the field object definition. In past versions of News this was a simple array, now it is an associative one.
- customfieldsbyname = (deprecated) - A synonym for the 'fields' member
- fieldsbyname = (deprecated) - A synonym for the 'fields' member
- useexp (integer) = A flag indicating wether this article is using the expiry information.
- file_location (string) = A url containing the location where files attached the article are stored... the field value should be appended to this url.
Members can be displayed by the following syntax: {$entry->membername} or assigned to another smarty variable using {assign var='foo' value=$entry->membername}.
The following members are available in the entry array:
field Object Reference
The news_field object contains data about the fields and their values that are associated with a particular news article.
- id (integer) = The id of the field definition
- name (string) = The name of the field
- type (string) = The type of field
- max_length (integer) = The maximum length of the field (applicable only to text fields)
- item_order (integer) = The order of the field
- public (integer) = A flag indicating wether the field is public or not
- value (mixed) = The value of the field.