Get article displayed

Hi !
I’m developing a module for oxid CE 4.8.7 and I’m trying to find out a way I could know which articles are being displayed on the website.
So I extended the oxViewConfig class, and thought of using the getArticleList function after I retrieved the view (with getActiveView()).
So I have this :

class oxMyViewConfig extends oxMyViewConfig_parent
{
	
	public function setViewConfigParam( $sName, $sValue )
	{
		parent::setViewConfigParam($sName, $sValue);
                $oView = $this->getConfig()->getActiveView()
		$sProducts = $this->_getDisplayedProducts($oView);
	}

        protected function _getDisplayedProducts($oView)
        {
		$oArticleList = $oView->getArticleList();

        }

}

However when I do this, $oArticleList has a null value and no article is displayed :confused:. Does someone know why ? Is there another way I could retrieve the articles ?
Thanks !

       protected function _getDisplayedProducts($oView)
        {
        $oArticleList = $oView->getArticleList();

        }

You should return the $oArticleList in your function or save it in a class Variable to get access to your result.

       protected function _getDisplayedProducts($oView)
        {
        $oArticleList = $oView->getArticleList();
        return $oArticleList;
        }

Hi !
thanks for your answer but it’s not what I meant ^^
The problem is that by simply calling the [I]getArticleList()[/I] method, no article appears on the webpage. And no error appears in my apache logs.
When I don’t call this method, there is no problem at all : the page appears normally with all the articles displayed.
Do you have an idea of what would cause this ?
thanks :slight_smile: