News Feed
Data Attributes
data-type- news (specifies news processor)data-url- url of page to grab news fromdata-noimage- comma-delimited image urls to replace missing images from news posts / featured image (widest in post). If multiple images are supplied one will be selected at randomdata-featured-width- specify the minimum width for the featured image. If no content images are suitable it will default to images specified in data-noimagedata-categories- querying the feed keywords only pull categories specified (comma delimited - if your tag has a comma in it please escape it with a backslash \,)data-categories-logic- handle multiple categories with logic OR or AND (default OR)data-ignore-categories- do not include the specified categories in the return (comma delimited - if your tag has a comma in it please escape it with a backslash \,)data-start- pull news after this start date (use string value dates described hereLink opens in a new window)data-end- pull news before this end date (use string value dates described hereLink opens in a new window)data-order- any template variable below ASC / DESC (ASC default)data-limit- limit the number of resultsdata-local-href- allow the {href} template variable to link to the newsbuilder page (false default)data-schedule-update- force an update of the page (comma delimited - use string value dates described hereLink opens in a new window, preferably in the format 1:30am)
Content Variables
Variables placed at the start of a new paragraph in newsbuilder that influence the behaviour of specific posts (options are all comma delimited). Usage:
variable: option1,option2
categories- keywordskeywords- keywordstags- keywordsauthors- usernamesrelated- urlstitle- overwrite page title
Template Variables
{sitebuilderID}- id of the item in sitebuilder{sitebuilderEdit}- url to edit the item{sitebuilderDelete}- url to delete the item{title}- title of news post{titleNormalised}- convert accents and other special chars to their basic equivalent{categories}- comma delimited categories{classes}- space delimited lowercase categories (useful for classes){publicationDate}- publication date in default style i.e. Friday 6 Jun 2014{publicationDateTS}- publication date millsecond timestamp{lastUpdated}- last updated date in default style i.e. Friday 6 Jun 2014{lastUpdatedTS}- last updated date millsecond timestamp{image}- image src for the post, if empty can have default applied to attribute data-noimage{featuredImage}- widest image in the content, if empty can have default applied by attribute data-noimage{excerpt}- content stripped of HTML tags{content}- content{paragraphExcerpt(x)}- Any paragraphs found in the content wherexcorresponds to the order in which it is found stripped of HTML tags{paragraphContent(x)}- Any paragraphs found in the content wherexcorresponds to the order in which it is found{paragraphClass(x)}- Any paragraphs found in the content wherexcorresponds to the order in which it is found creating a class name based on the id followed by "-p" thenx, i.e.news-p1{contentUrl(x)}- Any urls found in the content will create a set of links wherexcorresponds to the order in which it is found{image(x)}- Any images found in the content will create a set of links wherexcorresponds to the order in which it is found{href}- link to news post or to the URL field if "Use a pre-existing web page for this item's detail" is selected
Example
<div id="news" data-type="news" data-url="/fac/soc/economics/intranet/news/" data-noimage="/fac/soc/economics/staff/placeholder.png"data-limit="10">
<h2><a href="{href}">{title}</a> </h2>
<p>{publicationDate}</p>
<p><img src="{image}" border="0" height="150" /></p>
<p>{excerpt}</p>
</div>