px-files/_sys/php/site.php
public function is_page_in_breadcrumb( $page_path, $path = null ){
		if( is_null($path) ){
			$path = $this->px->req()->get_request_file_path();
		}
		for($i=0; $i<20; $i ++){
			if(strlen($this->get_page_info($path,'role'))){
				$path = $this->get_page_info($this->get_page_info($path,'role'),'path');
				continue;
			}
			break;
		}
		$breadcrumb = $this->get_breadcrumb_array($path);
		$current_page_id = $this->get_page_id_by_path($path);
		$target_page_id = $this->get_page_id_by_path($page_path);
		if( $current_page_id == $target_page_id ){
			return true;
		}
		foreach( $breadcrumb as $row ){
			$row_id = $this->get_page_id_by_path($row);
			for($i=0; $i<20; $i ++){
				if(strlen($this->get_page_info($row_id,'role'))){
					$row_id = $this->get_page_info($this->get_page_info($row_id,'role'),'id');
					continue;
				}
				break;
			}
			if( $target_page_id == $row_id ){
				return true;
			}
		}
		return false;
	}
public function is_page_in_breadcrumb( $page_path, $path = null ){
		if( is_null($path) ){
			$path = $this->px->req()->get_request_file_path();
		}
		for($i=0; $i<20; $i ++){
			if(strlen($this->get_page_info($path,'role'))){
				$path = $this->get_page_info($this->get_page_info($path,'role'),'path');
				continue;
			}
			break;
		}
		$breadcrumb = $this->get_breadcrumb_array($path);
		$current_page_id = $this->get_page_id_by_path($path);
		$target_page_id = $this->get_page_id_by_path($page_path);
		if( $current_page_id == $target_page_id ){
			return true;
		}
		foreach( $breadcrumb as $row ){
			$row_id = $this->get_page_id_by_path($row);
			for($i=0; $i<20; $i ++){
				if(strlen($this->get_page_info($row_id,'role'))){
					$row_id = $this->get_page_info($this->get_page_info($row_id,'role'),'id');
					continue;
				}
				break;
			}
			if( $target_page_id == $row_id ){
				return true;
			}
		}
		return false;
	}
ページが、パンくず内に存在しているか調べる。

@param string $page_path 調べる対象のページのパス、またはID。
@param string $path 起点とするページのパス または ページID。省略時、カレントページから自動的に取得します。
@return bool 存在している場合に `true`、存在しない場合に `false` を返します。