Wikia

Community Central

WatchlistRandom pageRecent changes

Header Template

63,452pages on
this wiki

Forum page

Forums: Index Support Requests Header Template
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 671 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

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.

So if Template:ListHead was:

=={{{1}}}== [[#toc|Top]]

{{ListHead|A}} would produce:

A

Top

I don't think you can produce the section header to have [edit] [top] - at least not withought custom CSS. -- RandomTime 12:38, July 15, 2010 (UTC)

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}}

would be a more appropriate code -- RandomTime 13:53, July 15, 2010 (UTC)
The Problem with both examples is [edit] will edit the template, not the section of the page. --  Roguebfl   talk    contribs    email   16:53, July 15, 2010 (UTC)
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

Seems to work. -- Fandyllic (talk · contr) 10:17 AM PST 15 Jul 2010
Except I do want a working edit link 8) --  Roguebfl   talk    contribs    email   18:20, July 15, 2010 (UTC)
Well, it's either a working edit link or (top) in the TOC... Mark (talk) 19:25, July 15, 2010 (UTC)
But I've seen templates that that aren't subst yes have working edit links to the page they are on, I just never figured out how to dissect them --  Roguebfl   talk    contribs    email   20:52, July 15, 2010 (UTC)
Sorry, I misread the original post.
== {{{1|A}}} ==
<span style="float:right; margin-right:5em; margin-top:-36px;">&#91;[[#top|top]]&#93;</span>

A

[top]

Is this good enough? -- Fandyllic (talk · contr) 2:57 PM PST 15 Jul 2010
Except if i put that into a template thant edit tage will edit the template not the Section A on the page. --  Roguebfl   talk    contribs    email   15:53, July 20, 2010 (UTC)

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

Around Wikia's network

Random Wiki