Template:Blog: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 14: Line 14:
{{#cargo_declare:_table=BlogPosts
{{#cargo_declare:_table=BlogPosts
|blog=Page
|blog=Page
|pageName=String           <!-- Actual page name for reliable linking -->
|pageName=String
|title=String               <!-- Custom display title -->
|title=String
|date=Date
|date=Date
|author=String
|author=String
Line 26: Line 26:
{{#cargo_store:_table=BlogPosts
{{#cargo_store:_table=BlogPosts
|blog={{BASEPAGENAME}}
|blog={{BASEPAGENAME}}
|pageName={{PAGENAME}}     <!-- Stores the real page name -->
|pageName={{PAGENAME}}
|title={{{title|{{PAGENAME}}}}} <!-- Uses custom title or falls back to page name -->
|title={{{title|{{PAGENAME}}}}}
|date={{{date}}}
|date={{{date}}}
|author={{{author}}}
|author={{{author}}}
Line 34: Line 34:
}}
}}


{| class="wikitable" style="float:right; width:300px; margin-left:15px;"
{{Infobox
|-
| bodystyle    = width:22em; float:right; margin-left:1em;
| colspan="2" style="text-align:center; background-color:#f0f8ff; font-size:120%; font-weight:bold;" | {{{title}}
| headerstyle  = background:#f0f8ff; text-align:center;
|-
| labelstyle    = background:#e6f3ff; text-align:right; font-weight:bold;
| style="background:#e6f3ff; text-align:right; font-weight:bold;" | Posted:
| datastyle    =
| {{#dateformat:{{{date}}}|mdy}}
 
|-
| header1 = {{{title|{{PAGENAME}}}}
| style="background:#e6f3ff; text-align:right; font-weight:bold;" | Author:
 
| {{{author|Unknown}}}
| label2  = Posted
|-
| data2  = {{#dateformat:{{{date}}}|mdy}}
| style="background:#e6f3ff; text-align:right; font-weight:bold;" | Tags:
 
| {{#if: {{{tags|}}}
| label3  = Author
  | {{{tags}}}
| data3  = {{{author|Unknown}}}
  | None
 
}}
| label4  = Tags
|-
| data4  = {{#if: {{{tags|}}} | {{{tags}}} | None }}
| colspan="2" |
 
{{#if: {{{summary|}}}
| below  = {{#if: {{{summary|}}} | <em>{{{summary}}}</em> | <em>No summary provided.</em> }}
  | <em>{{{summary}}}</em>
  | ''No summary provided.''
}}
}}
|}


<!-- Full blog post content starts here – flows to the left of the infobox -->
<!-- Full blog post content starts here – flows to the left of the infobox -->