Template talk:Chembox transcluded
From Wikipedia, the free encyclopedia
Contents |
[edit] Parser functions
- For an example of how this method would work see {{Template:Drugbox}} and {{Template:Protbox}}
Would anyone object to a complete overhaul of this template using parser functions? Apperance would be similar to it is now with automatic hiding of unfilled sections... Zephyris 10:33, 19 August 2006 (UTC)
- Unfortunatly looking into this it would have to be created as a separate template as backward compatibility is essentially impossible. Zephyris 21:01, 20 August 2006 (UTC)
- A separate template using parser functions has apparently already been created. See: {{chembox new}}. The discussion of this can be found at: Wikipedia talk:Chemical infobox#Template:Chembox newGAThrawn22 00:36, 21 August 2006 (UTC)
[edit] add a way to hide the hazard section
For some chemicals the hazard section & supplementary sections are likely to never be useful or completed. Can you add a way in this template to hide those sections? As it stands now, it just clutters up the page. For an example: Psilocybin. Maybe:
{{Chembox/SectHazards|HIDE}}
or something to that extent? Jeff Carr 08:27, 23 January 2006 (UTC)
- Nevermind, I see now that by just removing the lines I don't want they automagically are removed from the infobox. Excellent. Jeff Carr 09:35, 23 January 2006 (UTC)
[edit] adding new entries to the template?
I can't tell if I can add new entries to the template. I assume not so this is a request for some I've run across. Some pages are harder to move to this template because I don't want to remove data from the existing tables. There are many drug related chemicals that have rows for medical related effects: pregnacy, excretion, delivery, etc. See Melatonin as an example. Another request would be a generic "Other Interesting Facts" row. Serotonin has the mass by percentage of each element. It's easily computed, but perhaps just fun statistics? This row would be useful when transitioning over existing tables. Jeff Carr 10:07, 23 January 2006 (UTC)
- First of all, if the table is blue it's a {{drugbox}} kept in order by Wikipedia:WikiProject Drugs: we don't tend to change these tables to a chembox format.
- Woops, sorry, new user error. Jeff Carr 20:17, 27 January 2006 (UTC)
- You can add further rows simply by expanding the table. The simplest way to do this is to look at the code for Template:Chembox, but it will also work for the transcluded version: simply add the lines in pipe format where you want them. Please be aware that many editors consider that the table is already too long, so take care when making it even longer! Physchim62 (talk) 15:23, 25 January 2006 (UTC)
- I'm missing something fundamental here. In the transluded box code for example the line:
{{Chembox/CASNo|?-?-?}}
-
- Is somehow magically translated into a table row with "CAS Number" and brackets around the number. There seems to be some substitution logic somewhere. Any url's docs or ways I can learn more to contribute to making this work better are appreciated. I really think this "transcluded" syntax is a huge win. Jeff Carr 20:17, 27 January 2006 (UTC)
- That line simply calls another template, specifically Template:Chembox/CASNo. This is why I say that this version is only semi-transcluded. If you go to the template and click on the "Edit this page" tab, you will see how the code works. Hint: the {{{1}}} is the template argument. All I did to create {{chembox transcluded}} was to break down the {{chembox}} code into smaller chunks and set them as individual templates. These templates have their uses, especially when converting old form tables into the current version, but they are not truely transcluded. Still, this arrangement is much more flexible than a fully transcluded template, as I think you're finding out yourself! Physchim62 (talk) 20:35, 27 January 2006 (UTC)
[edit] suggestion for link to "help"
I think the links on the botton of this template could also be done in a more "standard" wikipedia way by modeling how the taxobox is done. See Wikipedia:How to read a taxobox and the taxobox itself. (example: Plant, Tulip, Cannibis) The idea here is to provide a '?' in the title bar. Jeff Carr 10:21, 23 January 2006 (UTC)
- It's a nice idea, but I can't see it happening anytime soon. Take a look at the discussion about transclusion on Template talk:Chembox... For the moment, almost all chemboxes are "ciscluded" (ie, inserted using the subst command). Physchim62 (talk) 15:28, 25 January 2006 (UTC)

