FANDOM


  • Hello,

    I'm trying to create a template that will automatically format the appearance of section headers, allowing the editor to customise the background color, border color, font color, text-alignment.

    With an end result similar to this formatting:

    Introduction

    The problems I'm encountering (depending on how I try to write the templates and/or structure my target wiki pages) are:

    1. If I don't include = inside the template, the template breaks the target wiki page formatting for a header.

    ==

    2. Or, if I do include = inside the template, the header created by the template isn't recognised as a section, so doesn't produce an [edit] link (despite the header created by the template appearing in the table of contents).

    3. Or, in another variant to including = inside the templates, an [edit] link is created above each section, but when used it takes the editor to the page that edits the template, rather than the page that edits the section on the target wiki page. (Again the table of contents recognises the template as a header)


    Is there a limitation/restriction between templates and headers?

      Loading editor
    • Oops, forgot to 'pre' the examples above. this is how the templates are being called on the target wiki page.

      1.

      ={{ColorHeader|Introduction}}=

      2.

      {{ColourHeader|Introduction|level=1}}

      3. 

      {{ColorHeader1|Introduction}}


      I can provide examples of how the templates are written, but one of them (2.) utilised multiple other templates to determine the header level.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.