TAG란? 다아시겠지만 어떤 정보를 검색할 때 사용하기 위해 부여하는 단어 혹은 키워드를 의미하며, 꼬리표라고도 부른다.

 

이 팁을 적용하면 글 작성시 태그를 입력해주시면 게시글 제목에 태그글이 표출됩니다.

 

Cap 2016-12-10 09-25-45-699.png

 

적용 코드는 스킨의 제목 끝쪽에 적당하게 붙여 주시면 될 것 같습니다.

 

{@
$tagModel = &getModel('tag');
$args->document_srl = $document->document_srl;
$tag_list = $tagModel->getDocumentsTagList($args);
}
<label cond="$tag_list->data">
<block loop="$tag_list->data=>$k,$v">
<font style="margin-left:2px;background-color:#EAEAEA;border-radius:4px;padding:2px 5px;font-size:10px;font-weight:color:#000000">{$v->tag}</font> 
</block>
</label>

 

소스 코드는 저도 검색해서 스타일만 적용한 상황입니다. 

 

링크를 눌렀을때 제목누른것처럼 링크를 걸려면 이렇게 하면 되겠네요

 

{@
$tagModel = &getModel('tag');
$args->document_srl = $document->document_srl;
$tag_list = $tagModel->getDocumentsTagList($args);
}
<label cond="$tag_list->data">
<block loop="$tag_list->data=>$k,$v">
<font style="margin-left:2px;background-color:#EAEAEA;border-radius:4px;padding:2px 5px;font-size:10px;font-weight:color:#000000"><a href="{getUrl('search_target','tag','search_keyword',$v->tag,'document_srl',$document->document_srl,'listStyle',$listStyle,'cpage','')}" rel="tag" class="tag">{$v->tag}</a></font> 
</block>
</label>

 

 

 

TAG •

보고하비

profile
작은 커뮤니티 사이트를 운영하고 있는 사람입니다. xe town이 있어서 정말 행복합니다.
  • ?
    좋은 정보 감사 합니다
  • ?
    이것을 적용해보니 보이기만 하고 클릭이 디는것은 아니군요 ㅎㅎ
  • ? profile
    네 제목글을 클릭하셔야 되요
  • profile
    오호 감사합니다. 찾고 있었는데..하하하하 링크는 안되는것인가요..

    제가 찾은 자료는 https://xe1.xpressengine.com/qna/23138666 이거 였습니다.

    감사합니다
  • profile ?
    https://xetown.com/lakepark/446189
  • profile
    그 게시글의 태그만 출력하려면 어떻게 하나요?
  • profile profile
    네 해당 게시글의 태그만 출력하는거에요
  • profile profile
    네 소스 그대로 적용하니 게시판의 태그모두가 출력되네요
  • profile profile
    아 리스트 군요 ..!! 전 본문 제목에다 출력하려고 하는데요. 리스트 제목은 잘 됩니다.
  • profile profile
    _document.header 부분에 getTitle 뒤쪽에 붙이시면 본문 제목 뒤쪽으로 붙어요..^^
  • profile profile
    <!--// 태그 -->
    {@ $tag_list=$oDocument->get('tag_list') }
    <label cond="count($tag_list)" class="rd_tag bxs clear">
    <!--@for($i=0;$i<count($tag_list);$i++)-->
    {@ $tag=$tag_list[$i]; }
    <font style="margin-left:2px;background-color:#EAEAEA;border-radius:4px;padding:2px 5px;font-size:10px;font-weight:color:#000000"><a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}">{htmlspecialchars($tag)}</a></font>
    <!--@end-->
    </label>

    본문 제목뒤에는 이렇게 해보세요
  • profile
    저 소스를 어디 파일에 추가해야해요? ㅠㅠ 뎨둉해여..ㅠㅠ 초보라서요 ㅠㅠㅠㅠㅠ
  • profile
    아 리스트 노말이군요! 찾았습니다 !