jQuery.exec_json(
"board.dispBoardContentList", {
"mid":current_mid
}, function(data){
console.log(data)
}
);
이런 식으로 document_list를 불러오는데, list_count가 모듈 정보에 입력된 값으로 고정되어 있는 것 같더라구요.
이걸 스크립트에서 변경할 수 있는 방법이 있을까요?
윤삼
Lv. 19
아무래도 중급 초반 수준의 코딩 오타쿠인 것 같습니다.
댓글 12
ajax 요청에 파라미터를 추가하는 방법으로는 바꿀 수 없을 것 같네요.
애드온을 사용해서 모듈 설정을 일시적으로 조작한다면 몰라도...
https://code.google.com/archive/p/xe-board/issues/107
코어 수정은 아무래도 비추겠죠...?
<?
function dispBoardContentList(){
// check the grant
if(!$this->grant->list)
{
Context::set('document_list', array());
Context::set('total_count', 0);
Context::set('total_page', 1);
Context::set('page', 1);
Context::set('page_navigation', new PageHandler(0,0,1,10));
return;
}
$oDocumentModel = getModel('document');
// setup module_srl/page number/ list number/ page count
$args = new stdClass();
$args->module_srl = $this->module_srl;
$args->page = Context::get('page');
$args->list_count = Context::get('_count') ? Context::get('_count') : $this->list_count;
$args->page_count = $this->page_count;
대충 이렇게 하면 되지 않을까요?
그런데 Context::get('_count')로 하신 건 list_count와 혼동이 생기는 걸 피하기 위함인가요?
거기서 좀 더 자유롭게 조작하려면 모듈을 만드셔야....(쿨럭)
결국 애드온을 만지게 될 줄이야...
게다가, 모듈이라니요 ㅡㅡ+
애드온 버전:
if ($called_position === 'before_module_proc' && $this->module_info->module === 'board')
{
if (Context::get('list_count'))
{
$this->module_info->list_count = Context::get('list_count');
}
}
처음 만드는 거여서 서툴겠지만 그래도 애드온으로다가 잘 복붙해보겠습니다.
감사해요~!