본문 바로가기

카르마님 통합검색확장모듈에서 특정게시판 검색 추가하는 방법

이온디 2017.09.25 17:56 조회 200 댓글 0
목록

출처 : https://www.xetown.com/index.php?mid=qna&category=671910&document_srl=743524

Thanks to 카르마님

수정파일 : isx.view.php


case 'term' :
$search_target = Context::get('search_target');
if(!in_array($search_target, array('title','content','title_content'))) $search_target = 'title_content';
Context::set('search_target', $search_target);
$term_srl = "289567,267";
$output = $oIS->getDocuments('', $term_srl, $search_target, $is_keyword, $page, 10);
Context::set('output', $output);
$this->setTemplateFile("term", $page);
break;


설명

case 'term' : // where=term 일 경우에
$search_target = Content::get('search_target'); // search_target 범위
if(..) $search_target = 'title_content'; // search_target은 기본으로 title_content를 대상으로 한다.
Context::set('search_target', $search_target); // search_target 대상정의
$term_srl = "363909"; // 모듈 srl 넘버
$output = $oIS->getDocuments('', $term_srl, $search_target, $is_keyword, $page, 10); // 출력은 = 문서를 가져오는데, $term_srl 을 기준으로, search_target 을 대상으로 하고, $is_keyword를 검색한다, $page는 10개로 나눠서 검색된 결과값을 출력한다.
Context::set('output', $output); //output 정의
$this->setTemplateFile("document", $page); // 이것을 document라는 파일명에 출력한다.


무료 자료

XE → 라이믹스 이전 체크리스트

옮기기 전에 확인할 것, 이전 중 자주 터지는 오류, 옮긴 뒤 손봐야 하는 것을 순서대로 정리했습니다.

댓글 0

아직 댓글이 없어요

이 글에 대한 생각을 가장 먼저 남겨보세요.

댓글을 작성하려면 로그인이 필요합니다.