Header Template
this wiki
Forum page
To contact staff directly or to report bugs, please use Special:Contact.
Contents |
I would like a Template that would replace == A == that will provide an [edit] link to the section (with preferably with out have to subst: the code) as well as a [top] link that jup back up to the pages TOC. soit itt would look something like {{ListHead|A}} -- Roguebfl talk contribs email 04:28, July 15, 2010 (UTC)
- I think it might be easier to add some custom javascript or CSS that added a "top" link next to the edit link in a section header. This would probably be easier, and prevent a massive amount of server load were you to ever edit the template (as it is transcluded into almost all the pages in the wiki) -- RandomTime 08:29, July 15, 2010 (UTC)
- Not it not going to be used on all pages, it for List pages only. Basically long page where jumping back and forth between the TOC and the sections is important. And most articles on the wiki are not list pages. -- Roguebfl talk contribs email 09:20, July 15, 2010 (UTC)
- The code [[#toc]] will jump to TOC.
- Not it not going to be used on all pages, it for List pages only. Basically long page where jumping back and forth between the TOC and the sections is important. And most articles on the wiki are not list pages. -- Roguebfl talk contribs email 09:20, July 15, 2010 (UTC)
So if Template:ListHead was:
=={{{1}}}==
[[#toc|Top]]
{{ListHead|A}} would produce:
A
Allright, this is probably how you wanted it.
Example [top]
The coding for the template would be:
=={{{title|}}}<div style="float:right"><span style="font-size:67%">[[[#top|top]]]</span></div>==
To create a section called: "example", use {{TEMPLATENAME|title=EXAMPLE}}. Mark (talk) 13:32, July 15, 2010 (UTC)
- I was trying to avoid having the [top] show up in the TOC, but yes - you can do that. As there's only one argument in that template, I think that:
=={{{1}}}<div style="float:right"><span style="font-size:67%">[[[#top|top]]]</span></div>==
{{TEMPLATENAME|Foo}}
- If you hide the real section heading, maybe it will hide the edit link and then you can put back something that looks like a section header, but with a Top link? So, you could make something that looks like a section heading with an anchor, but doesn't have the edit link:
<h2 style="display:none;">A</h2><div style="border-bottom:1px solid gray; padding-bottom:4px; width:100%;">
<span style="font-size:150%;">{{{1|A}}}</span><span style="float:right;">[[#top|Top]]</span>
</div>
A
ATop- Seems to work. -- Fandyllic (talk · contr) 10:17 AM PST 15 Jul 2010
- Sorry, I misread the original post.
== {{{1|A}}} ==
<span style="float:right; margin-right:5em; margin-top:-36px;">[[[#top|top]]]</span>
A
[top]
w:c:templates:Edit looks promising, but I can't an alternative way to define a section other than == == -- Roguebfl talk contribs email 15:56, July 20, 2010 (UTC)
- Have you tried
<h2></h2>? That should be equivalent to== ==. Also, it's w:c:templates:Template:Edit. -- Fandyllic (talk · contr) 12:59 PM PST 20 Jul 2010- Yes that's the template I mean. And yes I tried the <h2> the edit that comes with it targets the template the page. Using __NOEDITSECTION__ and w:c:templates:Template:Edit comes close, but it doesn't have a section to target. hence my question for an alternative way to defined a section. -- Roguebfl talk contribs email 21:49, July 20, 2010 (UTC)
- Unfortunately, unless MediaWiki changes the way it targets sections for editing, it will be very hard to do what you want. Currently editing sections relies on knowing the number of section on a page that one is attempting to edit and not by name. This is probably because there can be multiple sections of the same name.
- I didn't read it super closely, but maybe the MW:Extension:Labeled Section Transclusion can help. You would have to ask Wikia to enable it though and even then it might not solve your problem. -- Fandyllic (talk · contr) 6:47 PM PST 20 Jul 2010