Nodyn:Dolen geirfa

Oddi ar Wicipedia


Documentation icon Dogfennaeth nodyn[gweld] [golygu] [hanes] [puro]

Defnydd[golygu cod]

Pwrpas y nodyn {{dolen geirfa}} yw i greu nodiadau eraill sy'n creu dolenni at gofnodion penodol mewn geirfâu.

Cystrawen[golygu cod]

{{geirfa cardiau|geirfa=glossary article|term=term in glossary}}  results in:  [[{{{geirfa}}}#term in glossary|term in glossary]]

{{glossary link|glossary=glossary article|term=term in glossary|text=text in article}}  results in:  [[{{{geirfa}}}#term in glossary|term in glossary]]

The {{glossary link internal}} variant works exactly the same, but is used inside the glossary itself to provide cross-references between entries, and is also used when the same term is linked twice in other articles (e.g. because the article is very long). Its only difference from {{glossary link}} is that it does not use <dfn>, since it is only supposed to be used once per page per term, and it does not blue-link the link, only underlines it like {{dfn}} does, since we don't want to create a "sea of blue" link mess.

Each version of the template takes three case-sensitive, named parameters for its data (the first two mandatory):

  • |glossary=the name of the glossary article to be linked to
  • |term=the term entry in the glossary to be linked to  (or any {{anchor}} for it); a double quote (") character must be escaped as &quot; or the second half (term) of tooltip will not show up. Templates based on this one need to mention this prominently in their documentation.
  • |text=the actual text in the article to be linked from, if different from the term linked to

Cyfyngiadau: Ni ellir rhoi HTML neu iaith wici yn y paramedrau geirfa a term. Os oes angen gweithredu arddull i'r testun, er enghraifft gwneud term o iaith tramor yn italig, bydd rhaid gwneud hynny o gwmpas y nodyn neu o fewn y paramedr testun.

A fourth |color= parameter allows the color of the text to be changed. This should only be done when the rest of the text is also another color for some reason, e.g. because of white text in a dark-background table cell. The parameter will accept established HTML/CSS color names (e.g. white) and hex values (e.g. #FFFFFF), and is spelled "color" since this is the spelling used by HTML and CSS.

Some little-used parameters that are there just in case:

  • |id=an_ID – an ID (no spaces, must begin with alphabetic letter) for #linking and possibly other purposes
  • |style=arbitrary:css; – CSS directives for custom-styling the instance
  • |class=css_class – a CSS class or classes (separated by spaces not commas if more than one)

Enghraifft[golygu cod]

Y nodyn {{geirfa cardiau}} ar gyfer gemau cardiau:

{{dolen geirfa
|glossary=Geirfa gemau cardiau