xe에서 댓글 url 올때 해당 페이지 추출
더시민
0
1031
0
2021.01.23 12:47
댓글이 페이징 된 상태라고 한다면
댓글의 주소가 존재하지 않기 때문에 몇페이지에 해당하는지를 미리 검사해주는 부분이 필요한데
//xe에서 댓글값으로 url 올때 해당 페이지 추출
$comment_count = 50;
$comment_srl = Context::get('comment_srl');
if($comment_srl){//comment_srl 존재할때 페이지를 구한다.
$output = $oCommentModel->getCommentList($this->document_srl, $cpage, $is_admin);
if(array_search($comment_srl,array_column($output,'commnet_srl')) !==false ){}
else {
*********************************
}
}
대강 이런 형태에서..작동은 됨.