News example template

# NEWS TEMPLATES

## EXAMPLE

    Global markers, as set up in TypoScript:
    These are substituted throughout the whole template.

    Markers:
    GW1B / GW1E - wrap for news headers in single view
    GW2B / GW2E - wrap for more-links and the pagebrowser
    GW3B / GW3E - wrap for headers in latest and amenu templates

    GC1 - first alternating color
    GC2 - second alternating color
    GC3 - color for headers in latest and amenu templates
    GC4 - bgcolor for items in list view

    Common markers:
    These are substituted in all news item displaying templates:

    Markers:
    NEWS_UID - ID number (uid) of the news item
    NEWS_TITLE - News item title
    NEWS_AUTHOR - name of author
    NEWS_EMAIL - email of author
    NEWS_DATE - date
    NEWS_TIME - time
    NEWS_AGE - age of news item in minutes, hours, days or years
    NEWS_SUBHEADER - subheader, if empty main content is inserted here in LIST and LATEST
    NEWS_CONTENT - main content
    NEWS_LINKS - news links
    NEWS_CATEGORY - news item category
    NEWS_CATEGORY_IMAGE - news item category image
    NEWS_RELATED - links to related news
    NEWS_IMAGE - news item images
    NEWS_CATEGORY_ROOTLINE - the category rootline

    PAGE_UID - Page id of the parent page (pid)
    PAGE_TITLE - Title of the parent page of the news item
    PAGE_AUTHOR - Page author, if any
    PAGE_AUTHOR_EMAIL - Page author email, if any

    News Language Markers (see pi/locallang.php):
    LATEST_HEADER - header for the LATEST element
    GOTOARCHIVE - link to archive page in latest template
    ARCHIVE_HEADER - same for AMENU
    MORE - more ;-)
    TEXT_CAT - text output before categories and category images in LIST view (eg: 'categories:')
    TEXT_CAT_LATEST - the same in a shorter form for the LATEST element (eg: 'cat:')
    BACK_TO_LIST - link back to list-view in single-view template
    ARCHIVE_EMPTY_MSG - no items in archive
    SEARCH_EMPTY_MSG - message for empty search results
    TEXT_NEWS_AGE - text inserted before the age of the news item

    Wrapped Subparts:
    LINK_ITEM - link to the news item single display
    LINK_PREV - used in the pagebrowser
    BROWSE_LINKS
    LINK_NEXT

### TEMPLATE_LATEST

This is the template for the latest news, typically displayed on a frontpage.

###GW3B### ###LATEST_HEADER######GW3E###
###GW2B### ###NEWS_DATE### ###NEWS_TIME### ###NEWS_TITLE### ###NEWS_IMAGE### ###NEWS_SUBHEADER### ###MORE### ###TEXT_CAT_LATEST### ###NEWS_CATEGORY######NEWS_CATEGORY_IMAGE### ###GW2E###
###GW2B### ###NEWS_DATE### ###NEWS_TIME### ###NEWS_TITLE### ###NEWS_IMAGE### ###NEWS_SUBHEADER### ###MORE### ###TEXT_CAT_LATEST### ###NEWS_CATEGORY######NEWS_CATEGORY_IMAGE### ###GW2E###
###GW3B### ###GOTOARCHIVE### ###GW3E###

### TEMPLATE_LIST

This is the template for the list of news in the archive or news page or search.

###NEWS_CATEGORY_ROOTLINE###
###GW1B### ###NEWS_TITLE### ###GW1E### ###GW2B### ###NEWS_DATE### ###TEXT_NEWS_AGE### ###NEWS_AGE### ###GW2E###
###GW1B### ###NEWS_SUBHEADER### ###GW1E### ###GW2B######MORE######GW2E### ###GW2B### ###NEWS_AUTHOR### ###NEWS_TIME### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###NEWS_LANGUAGE######GW2E### |  | ###NEWS_IMAGE###
###GW1B### ###NEWS_TITLE### ###GW1E### ###GW2B### ###NEWS_DATE### ###TEXT_NEWS_AGE### ###NEWS_AGE### ###GW2E###
###GW1B### ###NEWS_SUBHEADER### ###GW1E### ###GW2B######MORE######GW2E### ###GW2B### ###NEWS_AUTHOR### ###NEWS_TIME### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###NEWS_LANGUAGE######GW2E### |  | ###NEWS_IMAGE###
###GW2B### ###LINK_PREV### ###BROWSE_LINKS### ###LINK_NEXT### ###GW2E###

### TEMPLATE_SINGLE

This subpart is used to display single news items
###NEWS_CATEGORY_ROOTLINE###

###NEWS_TITLE###
###GW2B### ###NEWS_DATE### ###NEWS_TIME###
###TEXT_NEWS_AGE### ###NEWS_AGE### ###GW2E###
###GW2B### ###NEWS_AUTHOR###
###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###GW2E###
###GW1B### ###NEWS_SUBHEADER###
###NEWS_IMAGE### ###NEWS_CONTENT###
###TEXT_LINKS###
###NEWS_LINKS###
###TEXT_RELATED###
###NEWS_RELATED###
###TEXT_FILES###
###FILE_LINK### ###GW1E###
###GW2B### ###BACK_TO_LIST### ###GW2E###

### TEMPLATE_SINGLE_RECORDINSERT

this is used if news-items are displayed with the 'insert records' content element

###NEWS_TITLE###
###GW2B### ###NEWS_DATE### ###NEWS_TIME###
###TEXT_NEWS_AGE### ###NEWS_AGE### ###GW2E###
###GW2B### ###NEWS_AUTHOR###
###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE######GW2E###
###GW1B### ###NEWS_SUBHEADER###
###NEWS_IMAGE### ###NEWS_CONTENT###
###TEXT_LINKS###
###NEWS_LINKS###
###TEXT_RELATED###
###NEWS_RELATED###
###TEXT_FILES###
###FILE_LINK### ###GW1E###

### TEMPLATE_ARCHIVE

Subpart for the news archive menu.

###GW3B### ###ARCHIVE_HEADER######GW3E###
###GW2B######ARCHIVE_TITLE### - (###ARCHIVE_COUNT### ###ARCHIVE_ITEMS###)###GW2E###
###GW2B######ARCHIVE_TITLE### - (###ARCHIVE_COUNT### ###ARCHIVE_ITEMS###)###GW2E###

### TEMPLATE_ARCHIVE_NOITEMS

Shown if the archive has no items!

###GW3B### ###ARCHIVE_HEADER######GW3E###
###GW2B### ###ARCHIVE_EMPTY_MSG### ###GW2E###

### TEMPLATE_SEARCH

Subpart for the search-form.

### TEMPLATE_SEARCH_EMPTY

this is shown if the search result is empty

###GW2B### ###SEARCH_EMPTY_MSG### ###GW2E###

### TEMPLATE_HEADER_LIST

shows a list of news titles

###GW1B### ###NEWS_TITLE### ###GW1E### ###GW2B### ###NEWS_TIME### ###TEXT_CAT_LATEST### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###GW2E###
###GW1B### ###NEWS_TITLE### ###GW1E### ###GW2B### ###NEWS_TIME### ###TEXT_CAT_LATEST### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###GW2E###
###GW2B### ###BROWSE_LINKS### ###GW2E###

### TEMPLATE_CAT_RELATED

shows a list of related news with the same category
###GW3B######NEWS_TITLE### ###NEWS_TIME### ###GW3E###