Template:Constellation navbox/doc

Constellation navbox is a common navigation template with fixed groups, based on Navbox and employing a Hlist format. This navbox is designed to accommodate a consistent design and arrangement of groups according to classes of astronomical objects and events for use by the navboxes of the 88 modern constellations recognised by the International Astronomical Union (IAU). These groups are arranged in the order of stars, exoplanets, star clusters, nebulae, galaxies, galaxy clusters and astronomical events. Sub-groups to accommodate for the splitting of relatively large lists of wikilinks into common catalogue designations are also included. Fourteen  and three   parser functions are used in this template.

Groups
This navbox uses the base Navbox template with its  and   groups used for the linking of related articles and the prime category associated with a constellation, respectively. The main body is divided into ten main groups, nine of which are optional and can be deactivated. The sole mandatory group, used to list stars, is left permanently active as it is anticipated that it would never need to be deactivated. Of the rest of the main groups, six are part of the "base groups", which are  navbox groups scaled to 151px width – these are groups dedicated to exoplanets, star clusters, nebulae, galaxies, galaxy clusters and astronomical events. Group headings of the base parameters are manually colored  to match the colour of the navbox's normal groups. The other three groups are part of the "extended groups", which are normal navbox groups scaled to 55px width, and like the mandatory stars group can accommodate space for its own  groups scaled at 70px width – these are groups dedicated to star clusters, nebulae, and galaxies. A visual aid to better illustrate these two group types is shown at the bottom of this section. Instructions on when to use the base and/or extended groups can be found in the "Usage" section below.

The 55px, 70px, and 151px widths of these groups were chosen as they were the smallest possible widths for each of the group headings that would accommodate the names of all of the groups on a single line, with the exception of the star clusters extended group, for which the name was split onto two lines with a  break. The use of  navbox groups for the base groups was to allow for the custom sizing of the groups to match the total width of the extended groups' headings – this cannot be achieved with the normal navbox groups, as all of the groups share the one common size parameter, , and the widths of the individual groups themselves cannot be changed.

Wikilinks
The use of wikilinks to New General Catalogue in the subheadings of the extended groups for star clusters, nebulae, and galaxies are determined by two  parser functions – the first parser deactivates the wikilink to New General Catalogue under the nebulae group if the   parameter is active, and the second deactivates the wikilink under the galaxies group if either   and/or   are active. This is to comply with the Manual of Style's guidelines on duplicate or repeated links. A caveat in the guideline states "if helpful for readers, a link may be repeated in infoboxes, tables, image captions, footnotes, hatnotes, [ect].]", but it would not be helpful in this case, as the repetition of "NGC" would make obvious the correlation of the NGC abbreviation to the New General Catalogue upon its first link when common sense is applied.

"constellation" and "related"
The  parameter is used to name the template, and provide wikilinks to the constellation chosen in the template's title, and its relevant category in the template's footer. You only need to input the name of a constellation in this parameter. This is because the template can automatically link to a constellation's article and category even with "(constellation)" disambiguation in their names, using three  parser functions. For example, input "Aquarius" instead of "Aquarius (constellation)", and "Leo" instead of "Leo (constellation)". The  parameter duplicates the   parameter from Navbox, and it is used in this case to list related articles, such as List of stars in Apus and Hydra in Chinese astronomy. Format the list of related articles by dedicating a new line to each entry, and using an asterisk before each entry – an example of this, and the use of , is illustrated below.



Base groups
The first seven parameters,,  ,  ,  ,  ,  , and  , are used to list stars in a constellation, divided among groups related to the stars' designations. The last six parameters,,  ,  ,  ,  , and  , are each dedicated to a class of astronomical objects and transient astronomical events in a constellation. Explanations on which articles are to be listed in each group, and how to link them, are listed in the table below. Like, lists should be formatted by dedicating a new line to each entry, and using an asterisk  before each entry. The addition of red links and redirects are highly discouraged per guidelines on navigational boxes which state that "red links and redirects should normally be avoided unless they are very likely to be developed into articles [...] Even then, editors are encouraged to write the article first." Unlinked text is also discouraged per the aforementioned guidelines.

Extended groups
If the number of wikilinks to New General Catalogue objects in the,  , and   groups, or the number of Messier objects and/or numbered galaxies in the   group exceeds four, and the total number of wikilinks in the aforementioned groups exceeds eight, the use of the navbox's extended groups are then encouraged. These are a set of seven optional subgroups which can be used to divide any, or all, of the aforementioned base groups into lists sorted by NGC, Messier, numbered, and other designations, similar to the base groups for stars. Explanations on which articles are to be listed in each group, and how to link them, are listed in the table below. Three  parser functions are employed in the template to prevent the misuse of both base and extended groups for the same class of astronomical objects – for example, the base group for star clusters  will be deactivated if the extended groups   and/or   are active. Like  and the parameters for the base groups, lists should be formatted by dedicating a new line to each entry, and using an asterisk  before each entry. Red links, redirects, and unlinked text are discouraged.