public function Articles($number=null) {
		if (!$number) {
			$number = $this->numberToDisplay;
		}

		$start = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
		if ($start < 0) {
			$start = 0;
		}

		$articles = null;
		$filter = null;
		if ($this->PrimaryNewsSection) {
			// get all where the holder = me
			$filter = array('NewsSectionID' => $this->ID);
		} else {
			$subholders = $this->SubSections();
			if ($subholders) {
				$subholders->push($this);
			} else {
				$subholders = null;
			}

			if ($subholders && $subholders->Count()) {
				$ids = $subholders->column('ID');
				$filter = array('ParentID' => $ids);
			} else {
				$filter = array('ParentID' => (int) $this->ID);
			}
		}

		$orderBy = strlen($this->OrderBy) ? $this->OrderBy : 'OriginalPublishedDate';
		$dir = strlen($this->OrderDir) ? $this->OrderDir : 'DESC';
		if (!in_array($dir, array('ASC', 'DESC'))) {
			$dir = 'DESC';
		}

		$articles = NewsArticle::get()->filter($filter)->sort(array($orderBy => $dir))->limit($number, $start);
		$entries = PaginatedList::create($articles);
		$entries->setPaginationFromQuery($articles->dataQuery()->query());

		return $entries;
	}
public function Articles($number=null) {
		if (!$number) {
			$number = $this->numberToDisplay;
		}

		$start = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
		if ($start < 0) {
			$start = 0;
		}

		$articles = null;
		$filter = null;
		if ($this->PrimaryNewsSection) {
			// get all where the holder = me
			$filter = array('NewsSectionID' => $this->ID);
		} else {
			$subholders = $this->SubSections();
			if ($subholders) {
				$subholders->push($this);
			} else {
				$subholders = null;
			}

			if ($subholders && $subholders->Count()) {
				$ids = $subholders->column('ID');
				$filter = array('ParentID' => $ids);
			} else {
				$filter = array('ParentID' => (int) $this->ID);
			}
		}

		$orderBy = strlen($this->OrderBy) ? $this->OrderBy : 'OriginalPublishedDate';
		$dir = strlen($this->OrderDir) ? $this->OrderDir : 'DESC';
		if (!in_array($dir, array('ASC', 'DESC'))) {
			$dir = 'DESC';
		}

		$articles = NewsArticle::get()->filter($filter)->sort(array($orderBy => $dir))->limit($number, $start);
		$entries = PaginatedList::create($articles);
		$entries->setPaginationFromQuery($articles->dataQuery()->query());

		return $entries;
	}
public function Articles ( $ number = null ) { if ( ! $ number ) { $ number = $ this -> numberToDisplay ; } $ start = isset ( $ _REQUEST [ 'start' ] ) ? ( int ) $ _REQUEST [ 'start' ] : 0 ; if ( $ start < 0 ) { $ start = 0 ; } $ articles = null ; $ filter = null ; if ( $ this -> PrimaryNewsSection ) { // get all where the holder = me $ filter = array ( 'NewsSectionID' => $ this -> ID ) ; } else { $ subholders = $ this -> SubSections ( ) ; if ( $ subholders ) { $ subholders -> push ( $ this ) ; } else { $ subholders = null ; } if ( $ subholders && $ subholders -> Count ( ) ) { $ ids = $ subholders -> column ( 'ID' ) ; $ filter = array ( 'ParentID' => $ ids ) ; } else { $ filter = array ( 'ParentID' => ( int ) $ this -> ID ) ; } } $ orderBy = strlen ( $ this -> OrderBy ) ? $ this -> OrderBy : 'OriginalPublishedDate' ; $ dir = strlen ( $ this -> OrderDir ) ? $ this -> OrderDir : 'DESC' ; if ( ! in_array ( $ dir , array ( 'ASC' , 'DESC' ) ) ) { $ dir = 'DESC' ; } $ articles = NewsArticle :: get ( ) -> filter ( $ filter ) -> sort ( array ( $ orderBy => $ dir ) ) -> limit ( $ number , $ start ) ; $ entries = PaginatedList :: create ( $ articles ) ; $ entries -> setPaginationFromQuery ( $ articles -> dataQuery ( ) -> query ( ) ) ; return $ entries ; }
Returns a list of articles within this news holder.

If there are sub-newsholders, it will return all the articles from there also

@return DataObjectSet
Returns a list of articles within this news holder .