Bản mẫu này hiển thị lời phát biểu một cách trực quan. Được sử dụng chủ yếu trên các trang tài liệu và thảo luận.
Đây chỉ là mockup trông tương tự như câu lệnh thực tế nhưng hoàn toàn không cung cấp bất kỳ chức năng thực sự nào (các nút chỉnh sửa/thêm không hoạt động).
Đặt P (thuộc tính) và V (giá trị). Bản mẫu [[d:Special:EntityPage/P|]] và [[d:Special:EntityPage/Q|]] cung cấp đầu ra tương tự như giao diện thực tế (chữ hoa). Mặt khác, bản mẫu {{Q}} đưa ra đầu ra không thực tế, nhưng có thể hữu ích (chữ thường).
{{Statement+
|P={{P-|27}}
|V={{Q-|145}}
}}
{{Statement+
|P={{Q|P27}}
|V={{Q|Q145}}
}}
Setting qp
, qv
(qualifier property and qualifier value) and rp
, rv
(reference property and reference value).
{{Statement+
|rank=+1
|P={{P-|800}}
|V={{Q-|25169}}
|qp={{P-|136}}
|qv={{Q-|761469}}
|rp={{P-|248}}
|rv={{Q-|5375741}}
}}
tác phẩm chính
|
|
[[d:Special:EntityPage/Q25169|]] |
sửa đổi |
|
|
▼ 1 nguồn tham khảo |
|
|
|
+ thêm giá trị
|
It is possible highlighting certain part, adding note, or inserting image, by using ordinary wikitext.
{{Statement+
|P={{P-|800}}<br/><br/>memo<br/>(↑ Inserted memo)
|V={{Q-|25169}}
|qp={{Font color|red|yellow|{{P-|136}} }}
|qv={{Font color|red|yellow|{{Q-|761469}} }} ← highlighted
|rp=[[File:OOjs UI icon alert-progressive.svg|20px]] {{P-|248}}<br/>(↑ Inserted image)
|rv={{Q-|5375741}}<ref group="note">Added note</ref>
}}
{{Reflist|group="note"}}
tác phẩm chính
memo (↑ Inserted memo)
|
|
[[d:Special:EntityPage/Q25169|]] |
sửa đổi |
|
|
▼ 1 nguồn tham khảo |
|
|
|
+ thêm giá trị
|
By using more longer code, it's possible to make complex statement mock-up. For details about input variables, see #Variables section.
{{Statement+
|P={{P-|69}}
|V={{Q-|691283}}
|q1.p={{P-|582}}
|q1.v1=1974
|q2.p={{P-|812}}
|q2.v1={{Q-|186579}}
|q3.p={{P-|512}}
|q3.v1={{Q-|1765120}}
|q4.p={{P-|580}}
|q4.v1=1971
|r1.p1={{P-|248}}
|r1.p1.v1={{Q-|5375741}}
|r2.p1={{P-|854}}
|r2.p1.v1=http://www.nndb.com/people/731/000023662/
|r2.p2={{P-|407}}
|r2.p2.v1={{Q-|1860}}
|r2.p3={{P-|123}}
|r2.p3.v1={{Q-|1373513}}
|r2.p4={{P-|813}}
|r2.p4.v1=7 December 2013
|r2.p5={{P-|1476}}
|r2.p5.v1=Douglas Adams (English)
|V2={{Q-|4961791}}
|V2.q1.p={{P-|582}}
|V2.q1.v1=1970
|V2.q2.p={{P-|580}}
|V2.q2.v1=1959
}}
|rank=
- Setting this parameter when you change rank.
|
Description
|
Example
|
|
Preferred or P or +1
|
|rank=+1
|
|
Normal or N or 0 (Default)
|
|rank=0
|
|
Deprecated or D or -1
|
|rank=-1
|
|width=
- Setting width by
%
or px
. For example |width=50%
or |width=400px
. Default is |width=80%
{{Statement+
|width=50%
|P={{P-|27}}
|V={{Q-|145}}
}}
|left=
or |indent=
- Setting indent by
px
or em
. For example |left=20px
or |left=5em
. Default is |left=0
{{Statement+
|left=5em
|width=50%
|P={{P-|27}}
|V={{Q-|145}}
}}
|reference=close
- By setting this parameter as
close
, collapsible reference table is shown with closed state.
{{Statement+
|reference=close
|width=50%
|P={{P-|27}}
|V={{Q-|145}}
|rp=Alfa
|rv=Bravo
|rv2=Charlie
|r2p=Delta
|r2v=Echo
|r2p2=Foxtrot
|r2p2v=Golf
|r3p=Hotel
|r3v=India
|r3v2=Juliett
}}
|showTables=1
- Debug option. By setting this parameter as
1
, each inner tables are shown with different color borders. See #Template structure section.
Although there are many field variables for this template, its syntax is basically simple. For example:
V2.r1.p4.v3
is "Second value's first reference's fourth property's third value."
Capital letter V
represents value (d:Help:Statements#Values). Lower case letter q
represents qualifier (d:Help:Qualifiers). Lower case letter r
represents reference (d:Help:Sources). And lower case letter v
represents value for qualifier or reference.
Following is canonical style input variables. Although it looks bit complex, standardized variables are useful when you construct big size statement. If you don't need such a huge size, see the next section, #Abbreviated style.
- Code
{{Statement+|
|reference = close
|showTables =
|P = P
|V1.rank =
|V1 = V1
|V1.q1.p = V1.q1.p
|V1.q1.v1 = V1.q1.v1
|V1.q1.v2 = V1.q1.v2
|V1.q1.v3 = V1.q1.v3
|V1.q2.p = V1.q2.p
|V1.q2.v1 = V1.q2.v1
|V1.q2.v2 = V1.q2.v2
|V1.q2.v3 = V1.q2.v3
|V1.q3.p = V1.q3.p
|V1.q3.v1 = V1.q3.v1
|V1.q3.v2 = V1.q3.v2
|V1.q3.v3 = V1.q3.v3
|V1.q4.p = V1.q4.p
|V1.q4.v1 = V1.q4.v1
|V1.q4.v2 = V1.q4.v2
|V1.q4.v3 = V1.q4.v3
|V1.r1.p1 = V1.r1.p1
|V1.r1.p1.v1 = V1.r1.p1.v1
|V1.r1.p1.v2= V1.r1.p1.v2
|V1.r1.p1.v3 = V1.r1.p1.v3
|V1.r1.p2 = V1.r1.p2
|V1.r1.p2.v1 = V1.r1.p2.v1
|V1.r1.p2.v2 = V1.r1.p2.v2
|V1.r1.p2.v3 = V1.r1.p2.v3
|V1.r1.p3 = V1.r1.p3
|V1.r1.p3.v1 = V1.r1.p3.v1
|V1.r1.p3.v2 = V1.r1.p3.v2
|V1.r1.p3.v3 = V1.r1.p3.v3
|V1.r1.p4 = V1.r1.p4
|V1.r1.p4.v1 = V1.r1.p4.v1
|V1.r1.p4.v2 = V1.r1.p4.v2
|V1.r1.p4.v3 = V1.r1.p4.v3
|V1.r1.p5 = V1.r1.p5
|V1.r1.p5.v1 = V1.r1.p5.v1
|V1.r1.p5.v2 = V1.r1.p5.v2
|V1.r1.p5.v3 = V1.r1.p5.v3
|V1.r2.p1 = V1.r2.p1
|V1.r2.p1.v1 = V1.r2.p1.v1
|V1.r2.p1.v2 = V1.r2.p1.v2
|V1.r2.p1.v3 = V1.r2.p1.v3
|V1.r2.p2 = V1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= V3.r3.p2.v1
|V3.r3.p2.v2 = V3.r3.p2.v2
|V3.r3.p2.v3 = V3.r3.p2.v3
|V3.r3.p3 = V3.r3.p3
|V3.r3.p3.v1 = V3.r3.p3.v1
|V3.r3.p3.v2 = V3.r3.p3.v2
|V3.r3.p3.v3 = V3.r3.p3.v3
|V3.r3.p4 = V3.r3.p4
|V3.r3.p4.v1 = V3.r3.p4.v1
|V3.r3.p4.v2 = V3.r3.p4.v2
|V3.r3.p4.v3 = V3.r3.p4.v3
|V3.r3.p5 = V3.r3.p5
|V3.r3.p5.v1 = V3.r3.p5.v1
|V3.r3.p5.v2 = V3.r3.p5.v2
|V3.r3.p5.v3 = V3.r3.p5.v3
}}
- Appearance
If you don't use so many fields, it is useful to use following simpler version. In this template, if number is abbreviated, it is automatically interpreted as 1
. For example, rp
is interpreted as r1.p1
. And if there is no first capital V
, it is interpreted as variable for V1
(first value). So finally rp
is interpreted as V1.r1.p1
.
- Code
{{Statement+|
|P = P
|rank =
|V = V
|qp = qp
|qv = qv
|qv2 = qv2
|qv3 = qv3
|q2p = q2p
|q2v = q2v
|q2v2 = q2v2
|q2v3 = q2v3
|rp = rp
|rv = rv
|rv2 = rv2
|rv3 = rv3
|rp2 = rp2
|rp2v = rp2v
|rp2v2 = rp2v2
|rp2v3 = rp2v3
|r2p = r2p
|r2v = r2v
|r2v2 = r2v2
|r2v3 = r2v3
|r2p2 = r2p 2
|r2p2v = r2p2v
|r2p2v2 = r2p2v2
|r2p2v3 = r2p2v3
|reference = close
|showTables =
}}
- Appearance
P
|
|
V |
sửa đổi |
|
|
▼ 2 nguồn tham khảo |
|
r2p 2 |
r2p2v |
|
|
r2p2v2 |
|
|
r2p2v3 |
|
|
|
+ thêm giá trị
|
Editing is welcome. Feel free to edit, change, modify, add the code or utilize Lua. But only one thing,
- #Annotation function is important key feature. So please keep current input style. (Wikitext input style)
In other words, please don't change input style to something like P=P31
or V=Q42
(property number only or item number only style.) Because in such format, users can't modify appearance.
Currently this template consists of three kinds of tables. By setting showTables=1
option, each tables are shown with different color borders.
Each tables are stored at following pages.
{{Statement+
|showTables=1
|P={{P-|800}}
|V={{Q-|25169}}
|qp={{P-|136}}
|qv={{Q-|761469}}
|rp={{P-|248}}
|rv={{Q-|5375741}}
}}
tác phẩm chính
|
|
[[d:Special:EntityPage/Q25169|]] |
sửa đổi |
|
|
▼ 1 nguồn tham khảo |
|
|
|
+ thêm giá trị
|
- Images used in this template: - - - (This is just a similar pencil image. Because couldn't find out actual pencil image.)
- (Q42) - Wikidata model page
- (Q4115189) - Sandbox. You can edit and see how actual interface looks like
- Help:Collapsing - documentation about the class used in collapsible reference table
- Module:Random - module used to assign unique IDs to each collapsible reference tables
- Special/AllMessages wikibase - list of wikidata system messages. Codes like
{{int:wikibase-statementlistview-add}}
(this returns "thêm giá trị") are system messages which are automatically translated to user's setting language.