Guide Category

134

relatednews.tpl

The related news module is using the theme file relatednews.tpl to display the related news list which using separate file is first was introduced in 9.4 version. In this module use custom template which is used to display the block of related news when viewing the full news on the website.
dlestarter
relatednews.tpl The related news module is using the theme file relatednews.tpl to display the related news list which using separate file is first was introduced in 9.4 version. In this module use custom template which is used to display the block of related news when viewing the full news on the website.

relatednews.tpl uses the following tags

Tag Name Description
{title} Display the article title
{title limit="x"} Displays article title with limited characters, a specified number of characters in the X tag. This will cut out the long original title to reduce title so it will help break the words in the middle and help in theme designs if there is limited space for article title.
{link} Full link URL to full story page
{date} Display the date of article was published in full format
{date=date format} Displays the date specified in the tag format. You can display not only the date but the whole format and its individual parts. The date format can only specified and used base on the standard format in PHP. For example the tag {date=d} - displays the day of the month of news or comment, and the tag {date=F} - displays the name of the month, and tag {date=d-m-Y H:i} - display the full date (day-month-year) and time
{image-x} Displays the images URL which is added in the "short news", where x is the number of "image number" in the news, for example {image-1} Image URL will display the first image from a "short news"
[image-x] text [/image-x] Display the text specified within tag if the picture number X is existing in the news
{text} Displays the full details from the "short news"
{text limit="x"} Displays only the text of a "short news" without any HTML formats from the text description in short news will be trim or cut out of X characters that have specified. However, cut or trim the text is logical to last word and will not breaks the text in the middle of words. Therefor your related news description will not be messed up in the code and common details.
{category} Category name which the article is posted in (without link)
{link-category} Link to all categories which the article is posted in and belong to
[xfvalue_x] Display the value of an XField, where X is the name of the custom field
[xfgiven_x] [xfvalue_x] [/xfgiven_x] XField control if the field X is filled when add/edit article, if the field is not filled in then the text or value within the control tag will be completely removed
[xfnotgiven_X] text [/xfnotgiven_X] Display the text specified within if XField was not specified in the article, where X is the name of XField

Related Tutorials

Review/Leave Comment

comments powered by Disqus