Developer manual

blog.listing.xslt

blog.listing.xslt is a template that can be passed to the /feed API to return pages in a blog or news style. Options specific to the blog.listing.xslt template are shown below. For details on the options for the /feed API see the appropriate documentation.

Updated: Type: feed

Method

<select name="feed"><option attribute="value">value</option></select>
<option value="publishdate">any</option>

Determines which publishdate to filter returned results. If not specified, Spring will include any document which has a publishdate set. To include any document, with or without a publishdate set the value to 'any'.

Default: [none]

Options: 'any', null: '', date or partial date: '2010-05'

Pagination

<option value="pagination-path">:view:news:latest</option>

Default: [none]

Options: [url] Spring path url to the embedded news page

<option value="count">20</option>

Default: [none]

Options: [number]

<option value="starts">0</option>

Default: [none]

Options: [number]

Notes: To use pagination, the 'starts' value must be dynamically set in layout.xml:

<option value="starts">
<query id="starts" else="0"/>
</option>

Current Experimental Deprecated

Option Attributes

  Attribute Type Description Default Required?
current id string Set the id used in the output html
Allowed values: Valid id name
No
current class string Set the class used in the output html
Allowed values: Valid class name
bloglisting No
current show option Space separated list of items to show for each individual news item displayed. The order of the items in the list determines the order shown.
Allowed values: <any field id>, date,title,thumbnail,short-post,full-post,author,print,event-date,comments,tags,gallery,none
date title thumbnail short-post No
current title string Title to be displayed above the news feed.
Allowed values: Text
none No
current dateformat string Change the format of the displayed publish date.
Allowed values: Valid date format characters - see /view/plugins/option-dateformat - which has been Base64 Encoded.
• The date format MUST be base64 encoded.

i.e. If the dateformat is 'd F Y', it should be entered as:

<option value="dateformat">ZCBGIFk=</option>

• Only used if 'date' is in the 'show' attribute.
• The default of 'd F Y' outputs the date in the format:

1 December 2013
d F Y No
current default-thumbnail string SpringURL to a default image to use if the article does not have a thumbnail set.
Allowed values: Valid springurl
• Only used if 'thumbnail' is in the 'show' attribute.
• Requires a valid Spring URL:
e.g. :upload:template:custom:thumb.png
No
current width number Width of thumbnail output
Allowed values: Valid number
• Only used if 'thumbnail' is in the 'show' attribute.
No
current height number Height of thumbnail output
Allowed values: Valid number
• Only used if 'thumbnail' is in the 'show' attribute.
No
current crop boolean Will crop the image rather after scaling to be the exact size of the width/height options
Allowed values: 1,0
• Only used if 'thumbnail' is in the 'show' attribute.
• If only a height or width attribute is set, it will use that value for both dimensions (crops square).
No
current quality number Quality of the thumbnail output
Allowed values: Valid number between 1-100
• Only used if 'thumbnail' is in the 'show' attribute.
80 No
current thumbnail-link option By default the thumbnail image is not a link. Using 'page' allows you to make the thumbnail link to the full article (as per the continue link). Using 'lightview' links the thumbnail to a larger version of the image in a lightview window.
Allowed values: page,lightview
• Only used if 'thumbnail' is in the 'show' attribute.
No
current round number Round corners of thumbnail
• Only used if 'thumbnail' is in the 'show' attribute.
No
current mask string Overlay an image mask over the thumbnail
Allowed values: • Requires a valid Spring URL:
e.g. :upload:template:custom:mask.png
• Only used if 'thumbnail' is in the 'show' attribute.
No
current continuecheck list Determines which fields Spring will check for each article to determine whether the article has content which needs to be linked to. i.e. Whether to show the 'Continue reading...' links.
Allowed values: Valid field name
html html1 html2 html3 html4 html5 html6 html7 html8 html9 No
experimental displayorder option
Allowed values: asc,desc
desc No
experimental itemlisttag string div No
experimental itemtag string div No
experimental articletitletag string h2 No
deprecated index-width number
deprecated index
deprecated index-id
deprecated index-type
deprecated index-height number

Examples

#1

Request

<p>
    <select name="feed">
        <option value="format">blog.listing.xslt</option>
        <option value="limit">5</option>
        <option value="sort">desc</option>
        <option value="show">thumbnail date title full-post</option>
        <option value="width">370</option>
        <option value="height">238</option>
        <option value="crop">1</option>
    </select>
</p>

Basic example

Response

Returns latest 5 articles based on publish date, sort descending, showing a 370x238px thumbnail, date, title and the full article post.

#2

Request

<p>
    <select name="feed">
        <option value="format">blog.listing</option>
        <option value="sort">desc</option>
        <option value="status">2</option>
        <option value="query">parentid:articles</option>
        <option value="count">20</option>
        <option value="limit">9999</option>
        <option value="starts">
            <query id="starts" else="0"/>
        </option>
        <option value="show">date title short-post</option>
        <option value="pagination-path">:view:investors-centre:asx-releases</option>
    </select>
</p>