টেমপ্লেট:Emptyor
ব্যবহৃত লুয়া: |
বিবরণ
[সম্পাদনা]Emptyor tests a piece of text to ascertain whether it's effectively empty or contains some text. It is a wrapper for the function emptyor() in Module:WikidataIB.
If the unnamed parameter consists only of html tags, punctuation (e.g. Wiki-markup) and whitespace, then Emptyor returns nothing; otherwise it returns the parameter unchanged.
In designing a Wikidata-enabled infobox, we may need to apply markup, such as italics, to a value fetched from Wikidata. However, if that value is blank, then the markup would normally produce a label with a blank entry for its data. Using this template will suppress such rows when nothing is returned from Wikidata.
ব্যবহারবিধি
[সম্পাদনা]উদাহরণ:
label99 = This Field
data99 =
{{emptyor
| <i>{{#invoke:WikidataIB |getValue |P666 |name=thisfield |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|}}} |onlysourced={{{onlysourced|}}} |noicon={{{noicon|}}} |list={{{list|}}} | {{{thisfield|}}} }}</i>
}}
If the getValue call returns anything, the infobox will show a row labelled "This field", with the value returned in italics.
If the getValue call returns nothing, the infobox will not show the row "This field".
উপরোক্ত নথিটি টেমপ্লেট:Emptyor/নথি থেকে প্রতিলিপ্ত। (সম্পাদনা | ইতিহাস) ব্যবহারকারীগণ খেলাঘর (তৈরি করুন | আয়না) এবং পরীক্ষা পাতায় (তৈরি করুন) এই টেমপ্লেট সংক্রান্ত পরীক্ষা-নিরীক্ষা করতে পারেন। দয়া করে /নথি উপপাতায় বিষয়শ্রেণী যোগ করুন। এই টেমপ্লেটের উপপাতাসমূহ। |