Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes.
Known Issue: Xatheral has been temporarily disabled while we investigate a bug with Year of the Dragon gift delivery.DDO Forums edit

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!

Template talk:Extra

From DDO wiki
Jump to navigation Jump to search

If a list contains more than 2 items, the list should look like "..., item, item, or item". Perhaps a small revamp on this template of:

]]{{#if: {{{1|2}}}<3| or|, or}} [[

Then for your argument you just put in the number of items. I'm going to ask Xevo for the "Loops" Extension. This would give us the ability to set {{{1}}} to number of items and make the template look like:

{{#vardefine:items|2}}{{#while:|{{#var:items}}<={{{1}}}|]]{{#if: {{#var:items}}<3| or|, or}} [[{{{{{#var:items}}}}}{{#vardefine:items|{{#expr:{{#var:items}}+1}}}}}}

Then you could just input it as... to get:
Item 1{{extra|2|Item 2}} OR Item 1{{extra|3|Item 2|Item 3}} OR Item 1{{extra|5|Item 2|Item 3|Item 4|Item 5}}
Item 1]] or [[ Item 2 OR Item 1]], [[Item 2]], or [[Item 3 OR Item 1]], [[Item 2]], [[Item 3]], [[Item 4]], or [[Item 5 ShoeMaker 15:25, May 7, 2011 (EDT)


Simple problem with this, wiki will close all brackets that will form a set.
So you all need to call them from other templates, and then i'm still not sure it will work. Neouni 16:55, May 7, 2011 (EDT)


Hehe ShoeMaker, didn't you wanted to call it a night :) ... I see you modified the usage to get rid of the 'any key' which is nice, however now a ',' shows up before the 'or' ... aahhh and I see, never mind, I have to use '2' instead of '4' :) SisAmethyst 09:28, May 8, 2011 (EDT)


Please see Using commas to list items for the English rules regarding the subject.. The argument in that template should now be a count of the total number of items in the list, and only on the last item... This will produce a or b for two items, a, b, or c for three, a, b, c, or d for four, etc.... :) ShoeMaker 09:41, May 8, 2011 (EDT)


Hehe, ok ... as from the same page: Opinions vary among writers and editors on the usage or avoidance of the serial comma. In American English, the serial comma is standard in most non-journalistic writing, which typically follows the Chicago Manual of Style. Journalists, however, usually follow the AP Stylebook, which advises against it. It is used less often in British English.[4][5] In many languages (e.g., French,[6] German,[7] Italian,[8] Polish,[9] Spanish[10]), the serial comma is not the norm and may even go against punctuation rules. It may be recommended in many cases, however, to avoid ambiguity or to aid prosody.

Being from Europe and having Journalists in the family I tend to not use this extra ',' except if it is an open list like "a, b, c, ... or z" or if it helps to avoid miss-understandings like in "a, b, c and d, and e" when indicating couples in a list before the final one. However, if we use the The Chicago Manual of Style instead of the The New York Times style I am fine with it as long as I know... maybe we should add this to the Help:Contents page? SisAmethyst 10:06, May 8, 2011 (EDT)

Seem to be making it yourself much harder then it is, we have plenty of maximum templates to spare on the item pages, and we don't want to force only the system admins to maintain those pages because your making it to hard for newcomers.→ Neouni 05:38, May 16, 2011 (EDT)