Version: current

     1 <?php
     2 /**
     3  * Расширение для всех страниц сайта для отображения Случайных и Последних статей
     4  *
     5  * @author menedem
     6  */
     7
     8  class PublicationSiteTree extends Extension {
     9
    10     // Случайные статьи RandomPublications($count=1, $favorites = false, $holderID = false)
    11     function RandomPublications($count = 1, $favorites = false, $holderID = false) {
    12         return Publication::get_publications($count, $favorites, $holderID, true);
    13     }
    14
    15     // Последние статьи LastPublications($count=1, $favorites = false, $holderID = false)
    16     function LastPublications($count = 1, $favorites = false, $holderID = false) {
    17         return Publication::get_publications($count, $favorites, $holderID, false);
    18     }
    19 }
    20
    21
    22
    23
    24
    25

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -