Forum:Header Template

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 -- 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) -- Random Time  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. -- 09:20, July 15, 2010 (UTC)
 * The code will jump to TOC.

So if Template:ListHead was:

would produce:

A
Top


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

Allright, this is probably how you wanted it.

Example [ top ]
The coding for the template would be: == [ top ]   ==

To create a section called: "example", use. 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:

== [ top ]   ==


 * would be a more appropriate code -- Random Time  13:53, July 15, 2010 (UTC)


 * The Problem with both examples is [edit] will edit the template, not the section of the page. -- 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:

 &lt;h2 style="display:none;"&gt;A&lt;/h2&gt;&lt;div style="border-bottom:1px solid gray; padding-bottom:4px; width:100%;"&gt; &lt;span style="font-size:150%;"&gt;&#123;&#123;&#123;1|A&#125;&#125;&#125;&lt;/span&gt;&lt;span style="float:right;"&gt;&#91;&#91;#top|Top&#93;&#93;&lt;/span&gt; &lt;/div&gt;
 * A  Top
 * Seems to work. -- Fandyllic  (talk &middot; contr) 10:17 AM PST 15 Jul 2010
 * Except I do want a working edit link 8) -- 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 -- 20:52, July 15, 2010 (UTC)
 * Sorry, I misread the original post.



&#123;&#123;&#123;1|A&#125;&#125;&#125;
&lt;span style="float:right; margin-right:5em; margin-top:-36px;"&gt;&amp;#91;&#91;&#91;#top|top&#93;&#93;&amp;#93;&lt;/span&gt;

&#91;top&#93;
 * Is this good enough? -- Fandyllic  (talk &middot; 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. -- 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 == == -- 15:56, July 20, 2010 (UTC)