News summary template help
Assigned Variables
- $prevpage (string) - If the current page number is one, this is a translated string for the 'prevpage' key. Otherwise, it is a link that will result in a summary view displaying the previous page
- $prevurl (string) - If the current page number is one, this is not defined/empty. Otherwise it is a URL that when placed in an <a> tag and clicked on will result in a summary view displaying the previous page.
- $fisstpage (string) - If the current page number is one, this is a translated string for the 'fistpage' key. Otherwise, it is a link that will result in a summary view displaying the fist page
- $firsturl (string) - If the current page number is one, this is not defined/empty. Otherwise it is a URL that when placed in an <a> tag and clicked on will result in a summary view displaying the first page.
- $nextpage (string) - If the current page number is the last page given the current criteria, this is a translated string for the 'nextpage' key. Otherwise, it is a link that will result in a summary view displaying the next page
- $nexturl (string) - If the current page number is the last page givent he current criteria, this is not defined/empty. Otherwise it is a URL that when placed in an <a> tag and clicked on will result in a summary view displaying the next page.
- $lastpage (string) - If the current page number is the last page given the current criteria, this is a translated string for the 'nextpage' key. Otherwise, it is a link that will result in a summary view displaying the last page
- $lasturl (string) - If the current page number is the last page givent he current criteria, this is not defined/empty. Otherwise it is a URL that when placed in an <a> tag and clicked on will result in a summary view displaying the last page.
- $pagenumber (int) - The current page number. Starting at 1.
- $pagecount (int) - The total number of pages to display, given the current criteria.
- $oftext (string) - The translated string for "of"
- $pagetext (string) - The translated string for "page"
- $itemcount (int) - The total number of items that will be displayed in this view (count of the $items array)
- $items - (object[]) - An array of objects representing the news articles to be displayed.
- $category_name (string) - If a category id or category name was passed to the call to this module, then this variable will contain the name of the specified category. Otherwise, it will be empty.
- $cats - (array) - An array of category information representing all categories in the News module.
News article objects
The $items array contains an array of news article objects. Below are the members.
Because the news article objects, are objects, you address them like: {$entry->id} etc.
- author_id (int) - The uid of the author. If greater than 0 an admin user account is assumed. If less than zero an FEU user account is assumed. A value of 0 indicates an anonymous user.
- author (string) The username of the author... or unknown
- authorname (string) - For admin user ids, this is a concatenation of the users first and last names, if they exist. This is undefined for FEU entries.
- id (int) - The numerical id of the article.
- title (string) - The title of the article.
- content (string) - The HTML content for the article.
- summary (string) - The article summary.
- postdate (string) - The article post date.
- extra (string) - Optional, extra information.
- startdate (string) - Optional, the start date of the article.
- enddate (string) - Optional, the end date of the article.
- create_date (string) - The date the article was first created.
- modified_date (string) - The date the article was last modified.
- category (string) - The article's category name.
-
- 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.
- fieldsbyname (associative) (deprecated) - A synonym for the 'fields' member
- file_location (string) - The URL prefix to where files for this article are stored.
- detail_url (string) - The URL to the detail view of the article.
- link (string) (deprecated) - The URL to the detail view of the article.
- titlelink (string) (deprecated) - A link (usign the article title as the text) to the detail view of the article.
- morelink (string) (deprecated) - A link (using a translation of the word "more" as the text), to the detail view of the article.
- moreurl (string) (deprecated) - A URL to the detail view of the article.
Category Information
The following section illustrates the important elements of the category array. Other items exist but are used for internal organizational purposes.
This information is deprecated, as it could be retrieved by calling the browsecat action.
Note, each of the members of the $cats array is an associiative array of it's own. You address it like {$cats[0]['news_category_name']} etc.
- news_category_id (int) - The id of this category entry.
- news_category_name (string) - The name of this category entry.
- parent_id (int) - The id of the parent of this entry. -1 indicates no parent.
- count (int) - A count of the number of displayable articles in this category.
- prevdepth (int) - The depth (from the root) of the previous node.
- depth (int) - The (from the root category) of the current node.
- url (string) - A URL to a summary view of all items in this category.