Template: Blog post

Created page with "<noinclude> <languages /> </noinclude>{{#switch: | = == {{{title}}} == '''Author:''' {{{author}}} {{(}}{{!}} class="wikitable" {{!}} People: {{{people|{{{1}}}}}} {{!}}- {{!}} Tags: {{{tags|{{{1}}}}}} {{!}}{{)}} | #default= {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Blog Post|noshift=1|uselang={{int:lang}}}} }}<noinclude> {{documentation}} </noinclude>"
 
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
<languages />
<!--
</noinclude>{{#switch:
This template uses Extension:Cargo.
| =
Make sure Cargo is installed and enabled before using this template.
== {{{title}}} ==
-->


'''Author:''' {{{author}}}
{{#cargo_declare:
  _table=blog_posts
  | title=String
  | date=Date
  | authors=List (;) of Page
  | image=File
  | image_alt=String
  | description=Wikitext string
  | keywords=List (;) of Page
  | mode=String (allowed values=draft,featured,hidden)
}}


{{(}}{{!}} class="wikitable"
<!-- Optional: link to documentation subpage if you make one -->
{{!}} People: {{{people|{{{1}}}}}}
{{!}}-
{{!}} Tags: {{{tags|{{{1}}}}}}
{{!}}{{)}}
| #default=
  {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Blog Post|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude><includeonly>
{{#cargo_store:
  _table=blog_posts
  | title={{{title|{{PAGENAME}}}}}
  | date={{{date|}}}
  | authors={{{authors|{{{author|}}}}}}
  | image={{{image|}}}
  | image_alt={{{image_alt|}}}
  | description={{{description|}}}
  | keywords={{{keywords|}}}
  | mode={{{mode|}}}
}}
 
<!-- Optional: TemplateStyles (create the stylesheet page shown below) -->
<templatestyles src="Template:Blog post/styles.css" />
 
<div class="blogpost">
 
  <!-- Banner image (hidden if hide_banner=yes or image not set) -->
  {{#if:{{{hide_banner|}}}||
    {{#if:{{{image|}}}|
      [[File:{{{image}}}|class=blogpost-banner|alt={{{image_alt|{{{description|}}}}}}]]
    }}
  }}
 
  <!-- Title -->
  <h1 class="blogpost-title">{{{title|{{PAGENAME}}}}}</h1>
 
  <!-- Meta line -->
  <div class="blogpost-meta">
    {{#if:{{{date|}}}|<span class="blogpost-date">{{{date}}}</span>}}
    {{#if:{{{authors|{{{author|}}}}}}|
      {{#if:{{{date|}}}| • }}<span class="blogpost-authors">{{{authors|{{{author|}}}}}}</span>
    }}
    {{#if:{{{mode|}}}| • <span class="blogpost-mode">{{{mode}}}</span>}}
  </div>
 
  <!-- Description / standfirst -->
  {{#if:{{{description|}}}|
    <div class="blogpost-desc">{{{description}}}</div>
  }}
 
  <!-- Keywords display (optional, semicolon-separated if you want Cargo to parse to pages) -->
  {{#if:{{{keywords|}}}|
    <div class="blogpost-keywords"><b>Keywords:</b> {{{keywords}}}</div>
  }}
 
</div>
 
<!-- Auto-categorize -->
[[Category:Blog posts]]
 
</includeonly>

Revision as of 17:36, 1 October 2025


This template defines the table "blog_posts". View table.

Template:Documentation

Discuss this page