Template:Blog: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 4: Line 4:
== Template parameters ==
== Template parameters ==
{{#template_params:
{{#template_params:
|title (label=Display Title)
|title (label=Post Title)
|date (label=Date, type=date, display format=mdy)
|date (label=Date, type=date, display format=mdy)
|author (label=Author)
|author (label=Author)
Line 13: Line 13:
== Cargo declaration ==
== Cargo declaration ==
{{#cargo_declare:_table=BlogPosts
{{#cargo_declare:_table=BlogPosts
|blog=Page
|blog=Page                 <!-- Parent blog hub page name -->
|pageName=String
|pageName=String           <!-- Actual subpage name -->
|title=String
|postTitle=String           <!-- Custom post title -->
|date=Date
|date=Date
|author=String
|author=String
Line 25: Line 25:
<includeonly>
<includeonly>
{{#cargo_store:_table=BlogPosts
{{#cargo_store:_table=BlogPosts
|blog={{BASEPAGENAME}}
|blog={{BASEPAGENAME}}     <!-- Automatically captures the parent blog name -->
|pageName={{PAGENAME}}
|pageName={{PAGENAME}}
|title={{{title|{{PAGENAME}}}}}
|postTitle={{{title|{{PAGENAME}}}}}
|date={{{date}}}
|date={{{date}}}
|author={{{author}}}
|author={{{author}}}
Line 40: Line 40:
| datastyle    =  
| datastyle    =  


| header1 = {{{title}}}
| header1 = {{{title|{{PAGENAME}}}}


| label2  = Posted
| label2  = Blog
| data2  = {{#dateformat:{{{date}}}|mdy}}
| data2  = [[{{BASEPAGENAME}}|{{BASEPAGENAME}}]]


| label3  = Author
| label3  = Posted
| data3  = {{{author|Unknown}}}
| data3  = {{#dateformat:{{{date}}}|mdy}}


| label4  = Tags
| label4 = Author
| data4   = {{#if: {{{tags|}}} | {{{tags}}} | None }}
| data4  = {{{author|Unknown}}}
 
| label5 = Tags
| data5   = {{#if: {{{tags|}}} | {{{tags}}} | None }}


| below  = {{#if: {{{summary|}}} | <em>{{{summary}}}</em> | <em>No summary provided.</em> }}
| below  = {{#if: {{{summary|}}} | <em>{{{summary}}}</em> | <em>No summary provided.</em> }}