User:Dovid/Sandbox
Sample Infobox member of the Knesset - for use with template changes proposed. These changes are to exclude (current in bold) where it is not appropriate
{{Infobox member of the Knesset |Image = [[Image:Yitzhak Meir Levin.jpg|180px]] |birth_date = 30 January 1893 |birth_place = [[Góra Kalwaria]], [[Russian Empire]] |Year of Aliyah = [[1940]] |death_date = 7 August 1971 |death_place = |Knesset(s) = [[Israeli legislative election, 1949|1st]], [[Israeli legislative election, 1951|2nd]], [[Israeli legislative election, 1955|3rd]], [[Israeli legislative election, 1959|4th]], [[Israeli legislative election, 1961|5th]], [[Israeli legislative election, 1965|6th]], [[Israeli legislative election, 1969|7th]]| |Party = [[Agudat Israel|Agudath Israel]] |Former parties = [[United Religious Front]],<br>[[Religious Torah Front]] |Gov't roles = [[Welfare and Social Services Minister of Israel|Minister of Welfare]] |}}
The infobox to the right shows the current template in use
The three side-by-side below use my modified template. Of those three
- the one on the left has a date of death (same would occur if it had a place of death or both date and place)
- the one in the middle has no date or place of death
- the one on the right uses a new parameter
The basic idea: There is text next to Ministerial posts that says (current in bold) However, frequently there is no current post, i.e., no bolded items. The temaplte can't easily parse out whether there are bold entries... I suppose a complex string parse formula could search for and only show the text if that's present, but that's complicated, and subject to missing a use case. Instead, I'm doing two things:
- if there is a date of death listed, don't put in the message
- if there is a place of death listed, don't put in the message
- even if there is no date/place of death, allow a new parameter to exclude the message; the new parameter is out with a default value of no. If the value is yes, then the message is excluded. This is for a living person who does not have a current post (and therefore no bolded items should be present)
The logic is essentially:
If date of death is blank Then If place of death is blank Then If out=no Then display message
Any value but NO skips the message. By leaving the value out, it takes on its default value of NO, leaving the message in.
I haven't written it yet, so let's see if the idea pans out
The following are based on the new test template at User:Dovid/Sandbox/IMOK
Has death info | No death info | New param | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|