No edit summary |
No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{doc subpage}} | {{doc subpage}} | ||
__NOEDITSECTION__ | |||
__NOTOC__ | |||
This template provide any easy way to add a link icon to each section (but can also be used to anything else) providing an URL to this section. | This template provide any easy way to add a link icon to each section (but can also be used to anything else) providing an URL to this section. | ||
The purpose of this template is to provide an easy way to redirect a user directly to the right section in the right page. This is particularly useful in mentoring activities, when the mentor want to provide a link to a section dealing with the concept he's talking about with its mentee on WME Chat or in the Forum. Once he has identified the wiki section which is relevant, he just have to copy the link location (URL) of the small [[File:. | The purpose of this template is to provide an easy way to redirect a user directly to the right section in the right page. This is particularly useful in mentoring activities, when the mentor want to provide a link to a section dealing with the concept he's talking about with its mentee on WME Chat or in the Forum. Once he has identified the wiki section which is relevant, he just have to copy the link location (URL) of the small [[File:Link.png|12px]] icon and paste it in the forum or in the Chat. | ||
<br /> | |||
<br /> | |||
== Usage == | == Usage == | ||
Line 15: | Line 20: | ||
===== {{@|Title of the Section}} ===== | ===== {{@|Title of the Section}} ===== | ||
<br /> | |||
<br /> | |||
== Extended Usage == | |||
This template allows to add a [[File:Edit.png|15px]] link icon in front of the section, that can open for edition another page than the one currently displayed. Use {{Para|edit}} parameter to enable this. | |||
This feature is useful when the displayed section is transcluded from another page, typically a subpage, and you want to bring the user to this subpage for content edition rather than editing the transclusion syntax in the current page itself. | |||
<code><nowiki>===== {{@|Title of the Section|edit=link to the subpage to edit}} =====</nowiki></code><br /> | |||
will produce : | |||
====={{@|Title of the Section|edit=link to the subpage to edit}} ===== | |||
{{Red|'''Be aware :'''}} to make sense, this feature should be used on wiki page that have enable the <code><nowiki>__NOEDITSECTION__</nowiki></code> tag, in order to not have this edit icon and the legacy <div class="mw-editsection plainlinks">[<span style="color:#002bb8;">edit</span>]</div>{{nbsp}} link side by side. | |||
<br /> | |||
<br /> | |||
== Limitations == | == Limitations == | ||
==== Duplicate anchor ==== | |||
The template will automatically create an Anchor (same behaviour than the {{tl|Anchor}} template without the link icon) with the section title as Anchor Identifier. | The template will automatically create an Anchor (same behaviour than the {{tl|Anchor}} template without the link icon) with the section title as Anchor Identifier. | ||
Thus, if your wiki page contains several sections with the same title, all will have the same Anchor identifier, which will result in a incorrect redirection when using the copied URL link. | Thus, if your wiki page contains several sections with the same title, all will have the same Anchor identifier, which will result in a incorrect redirection when using the copied URL link. | ||
Line 29: | Line 52: | ||
the only difference with the basic syntax is the URL provided by the link icon. | the only difference with the basic syntax is the URL provided by the link icon. | ||
==== Collapsible section ==== | |||
When using this template in conjunction with the [[Template:Collapsible section top|Collapsible section feature]], if the section is collapsed by default, then the URL link won't manage to bring the user to this expected section (as this section is not displayed). | |||
The best practice is to avoid to use this {{tl|@}} template on titles that belong to the collapsed portion of the text, except if the defaut behavior is to display the page with this portion expanded (use of the {{Para|expand|yes}} parameter in {{tlx|Collapsible section top|expand{{=}}yes}}) | |||
<includeonly> | <includeonly> |
Latest revision as of 15:46, 6 August 2015
This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
This template provide any easy way to add a link icon to each section (but can also be used to anything else) providing an URL to this section.
The purpose of this template is to provide an easy way to redirect a user directly to the right section in the right page. This is particularly useful in mentoring activities, when the mentor want to provide a link to a section dealing with the concept he's talking about with its mentee on WME Chat or in the Forum. Once he has identified the wiki section which is relevant, he just have to copy the link location (URL) of the small icon and paste it in the forum or in the Chat.
Usage
{{@|Title of the Section}}
will produce: Title of the Section
so concretely, a classic wikicode for a section like below
===== Title of the Section =====
should be modified as below
===== {{@|Title of the Section}} =====
to produce the following result :
Title of the Section
Extended Usage
This template allows to add a link icon in front of the section, that can open for edition another page than the one currently displayed. Use |edit=
parameter to enable this.
This feature is useful when the displayed section is transcluded from another page, typically a subpage, and you want to bring the user to this subpage for content edition rather than editing the transclusion syntax in the current page itself.
===== {{@|Title of the Section|edit=link to the subpage to edit}} =====
will produce :
Title of the Section
Be aware : to make sense, this feature should be used on wiki page that have enable the __NOEDITSECTION__
tag, in order to not have this edit icon and the legacy
link side by side.
Limitations
Duplicate anchor
The template will automatically create an Anchor (same behaviour than the {{Anchor}} template without the link icon) with the section title as Anchor Identifier. Thus, if your wiki page contains several sections with the same title, all will have the same Anchor identifier, which will result in a incorrect redirection when using the copied URL link.
In order to workaround this, a optional second parameter has been added to the template, allowing to specify an alternative Anchor ID. The syntax is the following :
{{@|Title of the Section|Alternate Anchor ID}}
producing: Title of the section
the only difference with the basic syntax is the URL provided by the link icon.
Collapsible section
When using this template in conjunction with the Collapsible section feature, if the section is collapsed by default, then the URL link won't manage to bring the user to this expected section (as this section is not displayed).
The best practice is to avoid to use this {{@}} template on titles that belong to the collapsed portion of the text, except if the defaut behavior is to display the page with this portion expanded (use of the |expand=yes
parameter in {{Collapsible section top|expand=yes}}
)