code: protected function getPathNodes()
  	{
  		if (!$this->varValue)
  		{
  			return;
  		}
  
  		if (!\is_array($this->varValue))
  		{
  			$this->varValue = array($this->varValue);
  		}
  
  		foreach ($this->varValue as $id)
  		{
  			$arrPids = $this->Database->getParentRecords($id, 'tl_page');
  			array_shift($arrPids); // the first element is the ID of the page itself
  			$this->arrNodes = array_merge($this->arrNodes, $arrPids);
  		}
  	}
docs: Get the IDs of all parent pages of the selected pages, so they are expanded automatically