웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
예를 들어 newest_document_for_extra_vars위젯에 xe_official 스킨을 사용하고
제목 앞에 분류를 출력시켜 [분류] 제목 이런식으로 표시 되게 출력하려고 한다면.
최근 게시물 출력시 카테고리(분류) 표시하기..
2009.01.30 18:26
최근 게시물 출력시에 분류 출력을 어떻게 시킬까 하고 고민하다가
그냥 단순하게 document_srl 에 같이 저장되어 있는 category_srl 을 불러다가
다시 DB에서 category_srl 을 기준으로 xe_document_categorie에 저장되 있는 title 을 불러오도록 하였습니다.
위젯을 님의 newest_document_for_extra_vars 를 사용했습니다 ^^;
예를 들어 newest_document_for_extra_vars위젯에 xe_official 스킨을 사용하고
제목 앞에 분류를 출력시켜 [분류] 제목 이런식으로 표시 되게 출력하려고 한다면.
// 결과가 있으면 각 문서 객체화를 시킴 if(count($output->data)) { foreach($output->data as $key => $attribute) { $document_srl = $attribute->document_srl; $oDocument = null; $oDocument = new documentItem(); $oDocument->setAttribute($attribute); // 카테고리 출력추가 if(count($mid_list) > 0) { $oModuleInfo = $oDocumentModel->getCategory($oDocument->get('category_srl')); $oDocument->menuname = $oModuleInfo->title; } $document_list[$key] = $oDocument; } } else { $document_list = array(); }
<span class="date">{$oDocument->getRegdate("Y-m-d")}</span> <span class="title"> <span>[{$oDocument->menuname}]</span> <a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}">{$oDocument->getTitle($widget_info->subject_cut_size)}</a> <!--@if($oDocument->getCommentCount())--> <span class="comment">[<a href="{$oDocument->getPermanentUrl()}#comment">{$oDocument->getCommentCount()}</a>]</span> <!--@end-->
사용 xe 버젼은 1.1.3 이고요 해당부분만 추가시켜주면 다른 최근 게시물 출력 위젯에서도 분류가 출력되더군요~
분류 의 현재 소스의 출력방식은 기본폰트 에 [ ]만 쳐져있는것이니 ..
출력방식 바꾸시려면 css를 적용시켜주시거나 span 부분에 style을 줘서 바꿔주시면되겠습니다.
댓글 5
-
만쓰별(정만)
2009.01.31 09:53
-
Kelvin
2009.01.31 21:07
이거하면 ㅠㅠ 아무것도 안떠요 ㅠㅠ -
아방스
2009.02.06 10:59
모튤명을 표시할려면...어떻게 하죠?
브라우져 타이틀이나... -
개돌
2009.04.10 09:08
저는 이렇게 적용 해봤는데요.. 팁이 될지..
widgets/newest_document/newest_document_for_extra_vars .class.php
// document 모듈의 model 객체를 받아서 결과를 객체화 시킴
$oDocumentModel = &getModel('document');
$category_list = $oDocumentModel->getCategoryList($args->module_srls);
Context::set('category_list', $category_list); // 두줄 내용 추가
widgets/newest_document/skins/xe_official/list.html
<span class="title">
<!--@if($oDocument->get('category_srl'))--> <!-- 카테고리가 있으면 카테고리를 표시-->
<b>[{$category_list[$oDocument->get('category_srl')]->title}]</b>
<!--@end-->
<a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}">{$oDocument->getTitle($widget_info->subject_cut_size)}</a>
<!--@if($oDocument->getCommentCount())-->
<span class="comment">[<a href="{$oDocument->getPermanentUrl()}#comment">{$oDocument->getCommentCount()}</a>]</span>
<!--@end-->
저는 이렇게 적용해봤습니다.(이미 올라온 팁이 있길래 그냥 댓글로 ㅎㅎ) -
비타민D
2011.10.05 09:53
간단한 방법이,, 감사 ^^
제목 | 글쓴이 | 날짜 |
---|---|---|
로그인 후 특정 그룹 페이지 가기 다른버전 [9] | 눈물많은OrOi | 2010.02.22 |
출석부 스킨에서 개근 표시하기 [소시랑 출석부기준] [25] | 10000kg | 2012.12.09 |
XE 1.7.3.0 default 스킨 IE9 드롭다운메뉴 안보이는 현상 [4] | 장포크 | 2013.05.13 |
회원 정보에 내 포인트 현황 출력하기
[3]
![]() | 화랑529 | 2013.01.08 |
Startssl 무료인증서 백업 복구 성공기!! [2] | 제이엔지 | 2013.01.15 |
PDF 파일 XE 게시판에서 바로 보여주기 [1] | ilgob | 2013.01.04 |
PDF파일을 게시판에서 첨부한 후 직접 보여주는 방법이 있는지요? [1] | 시카고 | 2012.12.30 |
닉네임, 레벨, 포인트등 활동정보바
[2]
![]() | 소렌트. | 2012.11.19 |
관리자의 회원포인트목록 에서 ID/닉네임 등으로 검색하는 소스 추가 [3] | sejin7940 | 2012.06.25 |
포인트 수정없이 원하는 레벨 아이콘이나 원하는 이미지 출력하기(0.29용) [20] | 지연아빠 | 2008.02.02 |
7일이상 지난 글에 댓글달면 포인트 지급 안하기 [19] | SMaker | 2011.02.21 |
XE 포인트 파일캐쉬대신 memcache 사용하기 [4] | 최기훈. | 2012.02.06 |
다운로드 필요 포인트가 0 인 모듈에서의 비회원 다운로드 권한 부여 [2] | 키네시스 | 2011.02.09 |
최근 게시물 출력시 카테고리(분류) 표시하기.. [5] | 엘카인 | 2009.01.30 |
회원가입폼 내멋대로 내맘대로 하기. [9] | 지인짜 | 2010.08.04 |
제로보드 관리자 레벨이 관리자 레벨로 안나올때 [5] | 나무넷 | 2007.08.23 |
우분투 10.04 LTS, 시스템 정보 보기 | fsfsdas | 2011.02.20 |
무선 네트웍 구성. [2] | 지니 | 2003.03.21 |
OpenBSD3.2 설치가이드 - 완결 [3] | pravda | 2002.11.02 |
각 디렉토리의 역할 [2] | Dopesoul | 2002.10.15 |
앞으로도 이런 멋진 자료 기대해봅니다.