Template

Resource: Difference between revisions

(Created page with "<noinclude> This is the "Item" template. It should be called in the following format: <pre> {{Item |Type= |Author= |Title= |Publication= |Date= |URL= |Saved= |Download= |Abstr...")
 
No edit summary
 
(229 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
This is the "Item" template.
This is the "Resource" template.
It should be called in the following format:
 
<pre>
Edit the page to see the template text.
{{Item
{{#cargo_declare:_table=Resources
|Type=
|_drilldownTabs=Table (format=table;fields=_pageName=Resource,Type__full=Type,Sentence,Abstract,Date), List
|Author=
|Type=List (;) of String
|Title=
|Sentence=Wikitext (size=500)
|Publication=
|Title=String (hidden)
|Date=
|Author=List (;) of String
|URL=
|Book_author=List (;) of String (hidden)
|Saved=
|Book_editor=List (;) of String (hidden)
|Download=
|Abstract=Wikitext (size=5000)
|Abstract=
|Organisation=List (;) of String
|Publisher=List (;) of String
|Date=Date
|Date_closed=Date
|URL=URL
|Archive=URL
|National_Archive=URL
|Volume=String (hidden)
|Issue=String (hidden)
|First_page=String (hidden)
|Last_page=String (hidden)
|DOI=String (hidden)
|Edition_number=String (hidden)
|Edition_next_title=String (hidden)
|ASIN=String (hidden)
|ISBN=String (hidden)
|Detail=Text
|External_links=Wikitext
|Saved=Boolean (hidden)
|Download=File
|Cover=File
}}{{#cargo_attach:
_table = News
}}
</noinclude><includeonly>{{#ifeq: {{{News|}}} |Yes| {{#cargo_store:_table=News
|Which_table=Resources
|RSS_pubdate={{{RSS pubdate|}}} }} }}{{#cargo_store:_table=Resources
|Type={{{Type|}}}
|Sentence={{{Sentence|}}}
|Title={{{Title|}}}
|Author={{{Author|}}}
|Book_author={{{Book author|}}}
|Book_editor={{{Book editor|}}}
|Abstract={{{Abstract|}}}
|Organisation={{{Organisation|}}}
|Publisher={{{Publisher|}}}
|Date={{{Date|}}}
|Date_closed={{{Date closed|}}}
|URL={{{URL|}}}
|Archive={{{Archive|}}}
|National Archive={{{National Archive|}}}
|Volume={{{Volume|}}}
|Issue={{{Issue|}}}
|First_page={{{First page|}}}
|Last_page={{{Last page|}}}
|DOI={{{DOI|}}}
|Edition_number={{{Edition number|}}}
|Edition_next_title={{{Edition next title|}}}
|ASIN={{{ASIN|}}}
|ISBN={{{ISBN|}}}
|Detail={{{Detail|}}}
|External_links={{{External links|}}}
|Saved={{{Saved|}}}
|Download={{{Download|}}}
|Cover={{{Cover|}}}
}}<div class="row">
<div class="medium-8 columns">
{{#if:{{#pos:{{{Download|}}}|.pdf}} | [[File:{{{Download}}}|thumb|link={{SERVER}}/media/{{urlencode:{{{Download}}}|WIKI}}]] }}
{{#if:{{{Sentence|}}}|'''{{{Sentence|}}}'''&#32;}}{{{Abstract|}}}
{{#if:{{{ISBN|}}} | <div align="right">{{#Widget:Bookshop book|ISBN={{{ISBN}}} }}</div>
|
{{#if:{{{Cover|}}} | 
[[File:{{{Cover}}}|frame| {{#if:{{{ASIN|}}}|link=https://www.amazon.co.uk/dp/{{{ASIN|}}}/ref=nosim?tag=mentalhealthlaw-21 | link=}} ]]
}}
}}
}}
</pre>
{{{Detail|}}}
Edit the page to see the template text.
{{#if:{{{External links|}}}|
{{#cargo_declare:_table=Items|Type=String|Author=List (;) of String|Title=String|Publication=String|Date=Date|URL=URL|Saved=Boolean|Download=File|Abstract=Text}}
==External links==
</noinclude><includeonly>{{#cargo_store:_table=Items|Type={{{Type|}}}|Author={{{Author|}}}|Title={{{Title|}}}|Publication={{{Publication|}}}|Date={{{Date|}}}|URL={{{URL|}}}|Saved={{{Saved|}}}|Download={{{Download|}}}|Abstract={{{Abstract|}}} }}{| class="wikitable"
{{#if:{{#pos:{{{Type|}}}|Statutory form}}|<p>Download options: {{{External links|}}}</p><p>{{statutory forms icon description}}</p> | {{{External links|}}} }}    }}
! Type
</div><!--first column-->
| {{{Type|}}}
<div class="medium-4 columns noexcerpt" style="border-left:1px solid black; padding-left:10px;">
|-
{{database header|RESOURCES}}
! Author
{{#ifeq:{{{Type|}}}|Book|<p>''All books can be viewed on the [[Books]] page''</p>}}<!--
| {{{Author|}}}
//-->{{#if:{{{URL|}}}{{{Download|}}}{{{Archive|}}}{{{National Archive|}}}{{#ifeq:{{{Saved|}}}|Yes|Yes|}}|<p>'''Download:''' {{link|url={{{URL|}}}|text={{#if:{{{URL|}}}{{{Archive|}}}{{{National Archive|}}}|Link|}}|file={{{Download|}}}|saved={{#ifeq:{{{Saved|}}}|Yes|s|}}|archive={{{Archive|}}}|natarchive={{{National Archive|}}} }}</p>}}<!--
|-
//-->{{#if:{{{ASIN|}}}|<p>'''Purchase:''' [https://www.amazon.co.uk/dp/{{{ASIN|}}}/ref=nosim?tag=mentalhealthlaw-21 Amazon link] {{#tip-info:This is an affiliate link: you will be financially supporting MHLO by using it.}}</p>}}<!--
! Title
//-->{{#if:{{{ISBN|}}}|<p>'''Purchase:''' [https://uk.bookshop.org/a/7527/{{{ISBN|}}} Bookshop.org link] {{#tip-info:This is an affiliate link: you will be financially supporting MHLO by using it. Bookshop.org supports indepdendent bookshops.}}</p>}}<!-----------><p>'''Type:''' {{add drilldown links semicolon|table=Resources|field=Type|values={{{Type|}}} }}</p>
| {{{Title|}}}
<p>'''Title:''' {{{Title|}}}</p><!------->{{#ifeq:{{{Type|}}}|Book|  {{#if:{{{Edition number|}}}|<p>'''Edition:''' {{{Edition number|}}}</p>}}{{#if:{{{Edition next title|}}}|<p>'''Newer edition:''' [[{{{Edition next title|}}}]]</p>}} }}<!------------>
|-
 
! Publication
{{#if:{{{Book author|}}}|
| {{{Publication|}}}
  {{#if:{{{Book editor|}}}|
|-
    <p>'''Author(s):''' {{add drilldown links semicolon|table=Resources|field=Author|values={{{Book author|}}} }}</p>
! Date
    <p>'''Editor(s):''' {{add drilldown links semicolon|table=Resources|field=Author|values={{{Book editor|}}} }}</p>
| {{{Date|}}}
  |
|-
    <p>'''Author(s):''' {{add drilldown links semicolon|table=Resources|field=Author|values={{{Book author|}}} }}</p>
! URL
  }}
| {{{URL|}}}
|
|-
  {{#if:{{{Book editor|}}}|
! Saved
    <p>'''Editor(s):''' {{add drilldown links semicolon|table=Resources|field=Author|values={{{Book editor|}}} }}</p>
| {{{Saved|}}}
  |
|-
    {{#if:{{{Author|}}}|
! Download
      <p>'''Author:''' {{add drilldown links semicolon|table=Resources|field=Author|values={{{Author|}}} }}</p>
| [[{{{Download|}}}]]
    }}
|-
  }}
! Abstract
}}<!--
| {{{Abstract|}}}
//-->{{#if: {{{Organisation|}}} | <p>'''Organisation:''' {{add drilldown links semicolon|table=Resources|field=Organisation|values={{{Organisation|}}} }}</p> }}<!---->{{#if:{{{Publisher|}}}|<p>'''Publisher''' {{add drilldown links semicolon|table=Resources|field=Publisher|values={{{Publisher|}}} }}</p>}}<!-----><p>'''Date:''' {{add drilldown link date|table=Resources|field=Date|value={{{Date|}}} }}</p><!----->{{#if:{{{Date closed|}}}|<p>'''Date closed:''' {{add drilldown link date|table=Resources|field=Date_closed|value={{{Date closed|}}} }}</p>}}{{#if: {{{Volume|}}} |<p>'''Volume:''' {{{Volume|}}}</p>}}{{#if: {{{Issue|}}} |<p>'''Issue:''' {{{Issue|}}}</p>  }}{{#if: {{{First page|}}} | <p>'''First page:''' {{{First page|}}}</p> }} {{#if: {{{Last page|}}} | <p>'''Last page:''' {{{Last page|}}}</p> }} {{#if: {{{DOI|}}} |<p>'''DOI''': {{{DOI|}}}</p> }}
|}
{{what links here}}
</div><!--second column-->
</div><!--row-->
<!--stopped using |description = {{{Abstract|}}} as it shortened the abstract...-->
{{#seo:
 
|dcterms:type={{{Type|}}}
 
|citation_authors={{{Author|}}}
 
|citation_title={{{Title|}}}
|dcterms:title={{{Title|}}}
 
|citation_journal_title={{{Organisation__full|}}}
|dcterms:source={{{Organisation__full|}}}
 
|citation_date={{{Date|}}}
|dcterms:date={{{Date|}}}
 
|dcterms:abstract={{{Abstract|No abstract available.}}}
|og:description={{{Abstract|No abstract available.}}}
|description={{{Abstract|No abstract available.}}}
 
|citation_public_url={{{URL|}}}
 
|citation_volume={{{Volume|}}}
|citation_issue={{{Issue|}}}
|citation_firstpage={{{First page|}}}
|citation_lastpage={{{Last page|}}}
|citation_doi={{{DOI|}}}


[[Category:Items]]
}}
[[Category:Resources]]
{{#ifeq:{{{Type|}}}|Book|  {{#if:{{{Title|}}}  |      {{DISPLAYTITLE:{{#replace:{{#titleparts:{{PAGENAME}} }}| {{{Title}}} | <i>{{{Title}}}</i>}} }}    }} }}
</includeonly>
</includeonly>

Latest revision as of 18:27, 23 January 2025

This is the "Resource" template.

Edit the page to see the template text. This template defines the table "Resources". View table.This template adds rows to the table "News", which is declared by the template News. View table.