26.09.11
0
조회 65
26.09.10
0
조회 61
26.09.10
0
조회 85
26.09.10
0
조회 65
26.09.10
0
조회 63
26.09.09
1
조회 58
26.09.04
0
조회 220
26.09.03
0
조회 305
26.09.01
1
조회 111
26.08.29
0
조회 146
26.08.22
0
조회 257
26.08.20
0
조회 284
26.08.13
0
조회 278
26.08.13
0
조회 317
26.08.13
0
조회 175
26.08.12
1
조회 238
26.08.10
0
조회 235
26.08.08
0
조회 190
26.08.08
0
조회 380
26.08.08
0
조회 181
댓글 5
쓰면됩니다.
getModel('document')->getCategory(Context::get('category_srl'));
$category_title = sprintf('[%s]',$category_info->title);
요런식으로 하니 되네요. 감사합니다.
Context::get('category_srl')
2차 카테고리 인데요. 2차 카테고리가 다른 시도와 겹치는 경우가 있어서
1,2차 카테고리를 함게 출력해 주려면 코드를 어떻게 추가하면 좋을까요???
1차 - 2차 카테고리명을 모두 알아내야 할 것 같습니다. 카테고리번호는 2차 카테고리 번호만 알고 있습니다.
{@
$oDocumentModel = getModel('document');
$second_category = $oDocumentModel->getCategory(Context::get('category_srl'));
if($second_category->parent_srl != 0) $first_category = $oDocumentModel->getCategory($second_category->parent_srl);
}
{$first_category->title}, {$second_category->title} 처럼 사용할수 있습니다.
(아직 테스트는 못해본 코드라 문제가 있을수 있습니다)