CGIMALL 소식/자주하는질문
[해피CGI][cgimall] 위지윅에서 템플릿 이용하기
해피CGI윤실장
2017. 6. 12. 09:13
위지윅의 메뉴중 템플릿 메뉴가 있습니다.
메뉴의 기능은 미리 만들어놓은 html 소스를 입력할 수 있는 기능입니다.
좌측의 이미지와 같은 창이 나타나며
미리 입력하여 놓은 내용을 넣거나
바꿀수 있습니다.
리스트는 이미지로 되어 있으며
wys2 / editor / dialog / fck_template / images /
위 폴더에 보시면
template1gif ~ template3.gif 까지 있습니다.
(기본적으로 3개의 템플릿이 입력되어 있습니다.)
template4.gif, template5.gif 와 같이 추가로
등록이 가능합니다.
- <Template title="Strange Template" image="template1.gif">
- <Description>A template that defines two colums, each one with a title, and some text.</Description>
- <Html>
- <![CDATA[
- <table cellspacing="0" cellpadding="0" width="100%" border="0">
- <tbody>
- <tr>
- <td width="50%">
- <h3>Title 1</h3>
- </td>
- <td> </td>
- <td width="50%">
- <h3>Title 2</h3>
- </td>
- </tr>
- <tr>
- <td>Text 1</td>
- <td> </td>
- <td>Text 2</td>
- </tr>
- </tbody>
- </table>
- More text goes here.
- ]]>
- </Html>
- </Template>
<Template title="Strange Template" image="template1.gif">
<Description>A template that defines two colums, each one with a title, and some text.</Description>
<Html>
<![CDATA[
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="50%">
<h3>Title 1</h3>
</td>
<td> </td>
<td width="50%">
<h3>Title 2</h3>
</td>
</tr>
<tr>
<td>Text 1</td>
<td> </td>
<td>Text 2</td>
</tr>
</tbody>
</table>
More text goes here.
]]>
</Html>
</Template>내용은 wys2 / fcktemplates.xml 파일을 수정하시면 됩니다.<Template title="Strange Template" image="template1.gif">
내용 입력부분
</Template>
위의 내용이 하나의 템플릿이 됩니다.
내용 입력부분은 <![CDATA[ 부터 ]]> 사이에 넣어주시면 됩니다.
html 코드로 입력을 하시면 되며 기본적으로 위지윅은 한글을 지원하지 않기 때문에
EUC-KR 서버에서 한글을 사용하실려면 fcktemplates.xml 파일의 첫번째줄
<?xml version="1.0" encoding="utf-8" ?> 를
<?xml version="1.0" encoding="euc-kr" ?>로 수정하시면 됩니다.
앞서 알려드린 이미지 파일은 (template1.gif )
< Template title="Strange Template" image="template1.gif">을 변경하시면 됩니다.
솔루션에 포함된 위지윅에 따라 차이가 있으며 템플릿 메뉴가 없거나
버전이 다르다면 사용하실 수 없습니다.