Terraria Wiki
탐색
대문
모든 문서
Interactive Maps
navigation
대문
최근 바뀜
임의의 문서로
위키 규칙
스타일 도움말
사용자 모임
관리자 알림판
도움말
포털 사이트
공식 웹사이트
공식 포럼
팬사이트
Terraria 공식 페이스북
Terraria IRC
Curse
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
게임
영화
TV
위키
위키 둘러보기
커뮤니티 중심
새 위키 만들기
아직 계정이 없으신가요?
가입하기
로그인
로그인
가입하기
Terraria Wiki
1,625
pages
탐색
대문
모든 문서
Interactive Maps
navigation
대문
최근 바뀜
임의의 문서로
위키 규칙
스타일 도움말
사용자 모임
관리자 알림판
도움말
포털 사이트
공식 웹사이트
공식 포럼
팬사이트
Terraria 공식 페이스북
Terraria IRC
Curse
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Terraria Wiki:DPL Manual/Controlling output format
편집하기 (부분)
돌아가기
원본 편집
역사 보기
토론 (0개)
Edit Page
Terraria Wiki:DPL Manual/Controlling output format
경고:
로그인하지 않았습니다. 편집을 하면 IP 주소가 공개되게 됩니다.
로그인
하거나
계정을 생성하면
편집자가 사용자 이름으로 기록되고, 다른 장점도 있습니다.
스팸 방지 검사입니다. 이것을 입력하지
마세요
!
== Arranging article lists in columns and rows == ===columns=== {{DPL parameter |name = columns |purpose= Define a column layout for the output. }} Syntax: <code>columns=<i>ncols</i></code> '''Example:''' <pre><nowiki> <dpl></nowiki> category=Test columns=3 rowcolformat=width=100% </dpl> </pre> Simply displays all articles and subcategories in [[:Category:Test]] in 3 columns ({{dpl3|rowcolformat}} is used to make the table width 100%). <dpl> category=Test columns=3 rowcolformat=width=100% </dpl> '''More complex example:''' In {{dpl3|mode|link=mode=userformat}} the outer tags from {{dpl3|listseparators}} will be repeated for each column. <pre><nowiki> <DPL></nowiki> category=Africa addpagesize=true ordermethod=size mode=userformat listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|style="text-align:right;"|%SIZE%,\n|-,\n|} count=12 columns=3 </DPL> </pre> The output will contain a list of the 12 largest articles on Africa, arranged in three columns. Each column consists of a table which has itself three columns: rank, article name and size. ''Unfortunately, it doesn't work...'' <DPL> category=Africa addpagesize=true ordermethod=size mode=userformat listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|style="text-align:right;"|%SIZE%,\n|-,\n|} count=12 columns=3 </DPL> ===rows=== {{DPL parameter |name = rows |purpose= Define a row layout for the output. A "row" is a group of output lines for which the heading is repeated. If you do not know how big your result will be, it may be better to use the "rowsize" parameter. }} Syntax: <code>rows=<i>nrows</i></code> In "mode=userformat" the outer tags from "listseparators" will be repeated for each column. Thus you can create long lists where the table heading is repeated from time to time. Example: <pre><nowiki> <DPL> category=Africa addpagesize=true ordermethod=size mode=userformat listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|style="text-align:right;"|%SIZE%,\n|-,\n|} count=12 rows=2 </DPL> </nowiki></pre> The output will contain a list of the 12 largest articles on Africa, arranged in two rows (of 6 lines each). Each row consists of a table which has itself three columns: rank, article name and size. ===rowsize=== {{DPL parameter |name = rowsize |purpose= Define a row layout for the output. A "row" is a group of n output lines for which the heading will be repeated. }} Syntax: <code>rowsize=<i>nrowsize</i></code> In "mode=userformat" the outer tags from "listseparators" will be repeated after each group of "rowsize" output lines. Thus you can create long lists where the table heading is repeated in regular intervals. Example: <pre><nowiki> <DPL> category=Africa addpagesize=true ordermethod=size mode=userformat listseparators={|class=sortablewikitable id=2\n!Rank\n!width=200px|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|style="text-align:right;"|%SIZE%,\n|-,\n|} rowsize=20 </DPL> </nowiki></pre> The output will contain a list of all articles on Africa. After each group of 20 entries (article names) the table heading will be repeated. It may be useful to set the width of the column with the article names explicitly, so that the tables in each row have equal width. ===rowcolformat=== {{DPL parameter |name = rowcolformat |purpose= Defines layout properties (using [[wikipedia:wikibooks:HTML_Programming/Tables|HTML table tag parameters]]) for the row/column grid. }} Syntax: <code>rowcolformat=<i>html tags</i></code> Example: <pre><nowiki> <DPL> category=Africa columns=3 rowcolformat=cellspacing=20 </DPL> </nowiki></pre> There will be more space around the columns than normal. See {{dpl3|columns}} above for another example. The ideal way to use {{dpl3|rowcolformat}} is to assign a CSS class to your DPL table which has been defined in your ''mediawiki:Common.css'' article. Example: <pre><nowiki> <DPL> category=Africa columns=3 rowcolformat=class=dpl3columns </DPL> </nowiki></pre> In your Common.css article you might have written something like table.dpl3columns td { background: #f2f2f2; padding: 0.5em; border:3px; width:33%; } [[분류:도움말]]
요약:
Please note that all contributions to the Terraria Wiki are considered to be released under the CC BY-NC-SA
취소
편집 도움말
(새 창에서 열림)
Follow on IG
TikTok
Join Fan Lab