Difference between revisions of "Help:Add new Honor"
DesignerThan (talk | contribs) |
m (copy editing) |
||
Line 3: | Line 3: | ||
__TOC__ | __TOC__ | ||
</div> | </div> | ||
− | + | This page describes how to add a new honor to the wiki. To understand which pages are important for an honor, read the section about the [[Pathfinder_Wiki:Structure|Structure of an Honor]]. | |
== Create the Honor Landing Page == | == Create the Honor Landing Page == | ||
− | That is the first page that | + | That is the first page that needs to be created. It has the following structure: The Honor Navigation, followed by an Overview and the Challenging-Part-Section. On the right side it has the infobox that is displaying the most important information about an honor. |
− | + | The source code will have the following structure: Template call of [[Template:HonorLanding|HonorLanding]] followed by the Overview and the Challenging-Part-Section. The content ends with a call of the [[Template:CloseHonorPage|CloseHonorPage-Template]] Use the following code as a starting point and set the needed arguments of the [[Template:HonorLanding|HonorLanding Template]], they are described in the documentation of the template, and write an awesome overview. Then the Landing Page should be finished. | |
<syntaxhighlight lang="html+handlebars" style="overflow:auto"> | <syntaxhighlight lang="html+handlebars" style="overflow:auto"> | ||
Line 57: | Line 57: | ||
</syntaxhighlight > | </syntaxhighlight > | ||
− | The page needs to start with the Template-Call of [[Template:HonorSubpage|HonorSubpage]]. It generates the Honor-Navigation, Language Switcher, the Infobox and the basic page structure. At the end of the page, the Template [[Template:CloseHonorPage|CloseHonorPage]] needs to be called, to close the HTML-Page-Structure. Between the two | + | The page needs to start with the Template-Call of [[Template:HonorSubpage|HonorSubpage]]. It generates the Honor-Navigation, Language Switcher, the Infobox and the basic page structure. At the end of the page, the Template [[Template:CloseHonorPage|CloseHonorPage]] needs to be called, to close the HTML-Page-Structure. Between the two Template calls the <code><section begin=Body /></code>-Tag and the <code><section end=Body /></code>-Tag is needed. The section-tags enable the wiki to include the enclosed content on other pages, by simply supplying the name of the section. Each section name must be unique on the page. |
− | The requirements are also enclosed by section-tags. The names of these start with "req", followed by the requirement number. Between the section-tags the translate-tags need to be opened and closed. | + | The requirements are also enclosed by section-tags. The names of these start with "req", followed by the requirement number. Between the section-tags the translate-tags need to be opened and closed. To prevent them from being included on other pages they need to be surrounded by noinclude-tags. For the sake of styling the whole requirement is surrounded by the b-tags to make the text bold. |
− | Next one needs to define the requirement that is the challenging part of the honor. That is again done by using the section-tags using the section name "challenge". In the example that would be the N-th requirement. | + | Next, one needs to define the requirement that is the challenging part of the honor. That is again done by using the section-tags using the section name "challenge". In the example that would be the N-th requirement. The challenging part of an honor may include sub-requirements. |
== Create the Answer Key's Page == | == Create the Answer Key's Page == | ||
− | As | + | As with the Requirements page, open the honors landing page and click on the answer key page, to create it. The following code is the template for the new page. |
<syntaxhighlight lang="html+handlebars" style="overflow:auto"> | <syntaxhighlight lang="html+handlebars" style="overflow:auto"> | ||
{{HonorSubpage}} | {{HonorSubpage}} | ||
− | |||
{{ansreq|page={{#titleparts:{{PAGENAME}}|2|1}}|num=1}} | {{ansreq|page={{#titleparts:{{PAGENAME}}|2|1}}|num=1}} | ||
<noinclude><translate> | <noinclude><translate> | ||
Line 87: | Line 86: | ||
{{CloseReq}} | {{CloseReq}} | ||
− | |||
{{CloseHonorPage}} | {{CloseHonorPage}} | ||
</syntaxhighlight > | </syntaxhighlight > | ||
− | The page needs to start with the Template-Call of [[Template:HonorSubpage|HonorSubpage]]. It generates the Honor-Navigation, Language Switcher, the Infobox and the basic page structure. At the end of the page, the Template [[Template:CloseHonorPage|CloseHonorPage]] needs to be called, to close the HTML-Page-Structure | + | The page needs to start with the Template-Call of [[Template:HonorSubpage|HonorSubpage]]. It generates the Honor-Navigation, Language Switcher, the Infobox and the basic page structure. At the end of the page, the Template [[Template:CloseHonorPage|CloseHonorPage]] needs to be called, to close the HTML-Page-Structure. |
− | + | Rather than retyping the requirement on the answer key, we include the requirement from the Requirements page directly so that if the requirement changes, it only has to be update in one place. To include the requirement from the requirements page add the [[Template:ansreq|ansreq-template]] with the <code>num</code>-Argument set to the number of the wanted requirement. After that, the opening translate-tag is needed, surrounded by noinclude-tags. For the readability it is common to add the text of the requirement inside of an HTML Comment after that. Now the answer can be written. | |
After the answer the closing translate-tag needs to be added, again surrounded by noinclude-tags. Then the [[Template:CloseReq|CloseReq]]-Template needs to be called. | After the answer the closing translate-tag needs to be added, again surrounded by noinclude-tags. Then the [[Template:CloseReq|CloseReq]]-Template needs to be called. | ||
− | This section needs to be repeated | + | This section needs to be repeated for each of the requirements. If there are sub-requirements just add another requirement section where the answer goes, but nest the sub-requirements between the ansreq and CloseReq templates. |
Revision as of 00:50, 4 October 2023
This page describes how to add a new honor to the wiki. To understand which pages are important for an honor, read the section about the Structure of an Honor.
Create the Honor Landing Page
That is the first page that needs to be created. It has the following structure: The Honor Navigation, followed by an Overview and the Challenging-Part-Section. On the right side it has the infobox that is displaying the most important information about an honor.
The source code will have the following structure: Template call of HonorLanding followed by the Overview and the Challenging-Part-Section. The content ends with a call of the CloseHonorPage-Template Use the following code as a starting point and set the needed arguments of the HonorLanding Template, they are described in the documentation of the template, and write an awesome overview. Then the Landing Page should be finished.
Create the Requirements Page
To create the requirement page, just use the link to the requirements page on the newly created honor landing page. Use the following code as a template for the requirements page.
The page needs to start with the Template-Call of HonorSubpage. It generates the Honor-Navigation, Language Switcher, the Infobox and the basic page structure. At the end of the page, the Template CloseHonorPage needs to be called, to close the HTML-Page-Structure. Between the two Template calls the -Tag and the
-Tag is needed. The section-tags enable the wiki to include the enclosed content on other pages, by simply supplying the name of the section. Each section name must be unique on the page.
The requirements are also enclosed by section-tags. The names of these start with "req", followed by the requirement number. Between the section-tags the translate-tags need to be opened and closed. To prevent them from being included on other pages they need to be surrounded by noinclude-tags. For the sake of styling the whole requirement is surrounded by the b-tags to make the text bold.
Next, one needs to define the requirement that is the challenging part of the honor. That is again done by using the section-tags using the section name "challenge". In the example that would be the N-th requirement. The challenging part of an honor may include sub-requirements.
Create the Answer Key's Page
As with the Requirements page, open the honors landing page and click on the answer key page, to create it. The following code is the template for the new page.
The page needs to start with the Template-Call of HonorSubpage. It generates the Honor-Navigation, Language Switcher, the Infobox and the basic page structure. At the end of the page, the Template CloseHonorPage needs to be called, to close the HTML-Page-Structure.
Rather than retyping the requirement on the answer key, we include the requirement from the Requirements page directly so that if the requirement changes, it only has to be update in one place. To include the requirement from the requirements page add the ansreq-template with the num
-Argument set to the number of the wanted requirement. After that, the opening translate-tag is needed, surrounded by noinclude-tags. For the readability it is common to add the text of the requirement inside of an HTML Comment after that. Now the answer can be written.
After the answer the closing translate-tag needs to be added, again surrounded by noinclude-tags. Then the CloseReq-Template needs to be called.
This section needs to be repeated for each of the requirements. If there are sub-requirements just add another requirement section where the answer goes, but nest the sub-requirements between the ansreq and CloseReq templates.