웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
모듈에서 무조건 JSON/XML 형식으로 출력하기
2015.04.03 20:02
모듈 개발 시 무조건 JSON 또는 XML로 출력을 해야하는 경우가 있습니다.
이 때에는 다음과 같이 코드를 삽입하시면 됩니다.
Context::setRequestMethod('JSON'); // XML은 XMLRPC로 설정해 주세요. Context::setResponseMethod('JSON'); // XML은 XMLRPC로 설정해 주세요. $this->add('test', 123);