Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:BlogHeader: Difference between revisions

Template page
(Created page with "<includeonly> <div class="blog-header"> {{#ifeq:{{PAGENAME}}|{{{link}}}| <!-- Viewing the blog post directly: Do not display the title --> {{Trail|{{{trail|The Gallows Gazette}}}}} {{DISPLAYTITLE:{{{title}}}}}| <!-- Being transcluded: Display the title --> <div class="blog-title"><h2>[[Blog:{{{link|{{PAGENAME}}}}}|{{{title}}}]]</h2></div> }} <div class="blog-meta"> <span class="blog-author">By [[User:{{{author}}}|{{{authorname|{{{author}}}}}}]] {{#if:{{{author2|}}}|and [...")
 
No edit summary
Line 12: Line 12:
</div>
</div>
{{#if:{{{image|}}}|<div class="blog-featured-image>
{{#if:{{{image|}}}|<div class="blog-featured-image>
[[File:{{{image}}}|center|link={{#ifeq:{{PAGENAME}}|{{{link}}}||Blog:{{{link|}}}}}|alt={{{imagealt|The featured image for {{{title}}}}}}]]
[[File:{{{image}}}|center|link={{#ifeq:{{PAGENAME}}|{{{link}}}||Blog:{{{link|}}}}}|{{{imagetitle|Featured blog image}}}|alt={{{imagealt|The featured image for {{{title}}}}}}]]
</div>}}
</div>}}
</div><templatestyles src="BlogHeader/styles.css" /></includeonly><noinclude>{{Documentation}}</noinclude>
</div><templatestyles src="BlogHeader/styles.css" /></includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 10:47, 2 April 2025

About this template

This template is used to create a header for a blog post in the Blog namespace. It should be at the very top of a post.

Usage

Copy the following and paste it onto a blog page:

{{BlogHeader
|title       =
|author      =
|authorname  =
|author2     = 
|author2name =
|date        =
|link        =
|image       =
|imagealt    =
|imagetitle  =
}}

Parameters

  • title: The blog post title.
  • author: The author of the blog post. This should be their wiki username.
  • authorname: Optional. Can be used to change the author's displayed name if it needs to be different from the wiki username.
  • author2: Optional. The second author of the blog post. This should be their wiki username.
  • authorname: Optional. Can be used to change the second author's displayed name if it needs to be different from the wiki username.
  • date: Published date. Should be in month-day-year format, e.g. "March 27, 2025"
  • link: This should be the name of the page itself, which should look a bit like: "2025/03/28/My Post". The blog namespace should not be included.
  • image: The featured image of the post. Technically optional, but should ideally always be included.
  • imagealt: Alt text for the image.
  • imagetitle: Title for the image.

Visit Template:BlogHeader/doc to edit this text! (How does this work?)