Template:ListModifications: Difference between revisions

From National Gallery Research Wiki
Jump to navigation Jump to search
(Created page with "<noinclude>__NOTOC__ {|cellpadding="10" cellspacing="0" border="1" style="border-style: solid; border-color: #F00" | ==Template Example== This template has been set-up to prod...")
 
No edit summary
 
Line 3: Line 3:
|
|
==Template Example==
==Template Example==
This template has been set-up to produced ordered lists of modifications listed on a specific [[:Category:Treatment Subpage|Treatment Subpage]].  
This template has been set-up to allow users to define the details of a modification event which occurred in relation to the thing being discussed on a given page.  
As an example on the [[NG1: Treatment]] page this template could be used to list all of the defined conditions issues identified in relation to [[NG1]]:
As an example on the [[NG1: Support]] page this template could be used multiple times to identify each change that was made to the support structure of [[NG1]]:
=== Example Code Options ===
=== Example Code Options ===
<pre>
<pre>
{{ListModifications
{{Modification
  |no=Specify maximum number of issues to be listed, the  
  |name=Add an optional comma separated list of people involved
    default value is 10.
in the event.
  |page=name of the page on which the conditions issues have been
|technique=Add an optional comma separated list of techniques
      defined, default value is <nowiki>{{PAGENAME}}</nowiki>.
used during the event.
      Defining "page" as "+" will return all modifications.
  |date=Indicate the date, or time span with which this event
  |list=Which modifications to list, default is to list all,
took place.
options can be: support, preparation, paint or surface.
|dateTo=Optional second date to indicate the end of a range
in the table.
of years.
|display=Display each entry. The default will be to hide all of the
individual entries but then display a list using an inline query.
|note=Free text description of the actual modification event
including all of the required details.
  |rtSupport=true or false, Modification is related to the
support
|rtPrep=true or false, Modification is related to the
preparation layers
|rtPaint=true or false, Modification is related to the
paint layers
|rtSurface=true or false, Modification is related to the
surface coatings
}}
</pre>
 
In addition to displaying the details entered the following internal semantic object will also be created with the defined semantic properties.
<pre>
{{#set_internal:P31F-has_modified
|P14F-carried out by#list={{{name|}}}
|P32F-used general technique#list={{{technique|}}}
|PN12F-has start date={{{date|}}}
|PN13F-has end date={{{dateTo|}}}
|P3F-has_note={{{note|}}}
|PN15F-is_related_to={{#ifeq:
  {{{rtSupport|}}}| Yes |Category:EN13-Support|}}
|PN15F-is_related_to={{#ifeq:
  {{{rtPrep|}}}| Yes |Category:EN48-Preparation_Layers|}}
|PN15F-is_related_to={{#ifeq:
  {{{rtPaint|}}}| Yes |Category:EN46-Paint_Layers|}}
|PN15F-is_related_to={{#ifeq:
  {{{rtSurface|}}}| Yes |Category:EN47-Surface_Coatings|}}
}}
}}
</pre>
</pre>
Line 21: Line 52:
=== Example Code ===
=== Example Code ===
<pre>
<pre>
{{ListModifications
{{Modification
  |no=10
  |name=Joseph Padfield
  |page=NG807: Treatment
  |technique=Edited
  |list=
  |date=2011
|dateTo=2012
|display=yes
|note=I created then edited this particular template.
}}
}}
</pre>
</pre>
|-
|-
|{{ListModifications
|  
  |no=10
* '''2011-2012''': I created then edited this particular template. (Joseph Padfield)
  |page=NG807: Treatment
<!---{{Modification
  |list=
|name=Joseph Padfield
}}
|technique=Edited
|date=2011
  |dateTo=2012
  |display=yes
  |note=I created then edited this particular template.
}}--->
|}
|}
</noinclude>
</noinclude>
<includeonly><nowiki/>{{#ask:[[P31F-has_modified::{{#if:{{{page|}}}|{{{page|}}}|{{PAGENAME}}}}]]
<includeonly><nowiki/>{{#if: {{{display|}}}|* '''{{{date|Please enter date or date range}}}{{#if: {{{dateTo|}}}|-{{{dateTo|}}}|}}''': {{{note|}}} {{#if: {{{name|}}}|({{{name|}}})| }}|}}{{#set_internal:P31F-has_modified
{{#ifeq: {{{list|}}}|support|[[PN15F-is_related_to::Category:EN13-Support]]|}}
|P14F-carried out by#list={{{name|}}}
{{#ifeq: {{{list|}}}|preparation|[[PN15F-is_related_to::Category:EN48-Preparation_Layers]]|}}
|P32F-used general technique#list={{{technique|}}}
{{#ifeq: {{{list|}}}|paint|[[PN15F-is_related_to::Category:EN46-Paint_Layers]]|}}
|PN12F-has start date={{{date|}}}
{{#ifeq: {{{list|}}}|surface|[[PN15F-is_related_to::Category:EN47-Surface_Coatings]]|}}
|PN13F-has end date={{#if: {{{dateTo|}}}|{{{dateTo|}}}|{{{date|}}}}}
|?PN12F-has start date
|P3F-has_note={{{note|}}}
|?PN13F-has end date
|PN15F-is_related_to={{#ifeq: {{{rtSupport|}}}| Yes |Category:EN13-Support|}}
|?P3F-has_note
|PN15F-is_related_to={{#ifeq: {{{rtPrep|}}}| Yes |Category:EN48-Preparation_Layers|}}
|?P14F-carried out by
|PN15F-is_related_to={{#ifeq: {{{rtPaint|}}}| Yes |Category:EN46-Paint_Layers|}}
|?P32F-used general technique
|PN15F-is_related_to={{#ifeq: {{{rtSurface|}}}| Yes |Category:EN47-Surface_Coatings|}}
|?PN15F-is_related_to
|limit={{#if:{{{no|}}}|{{{no|}}}|50}}
|sort=PN12F-has start date
|searchlabel=<br>... further results
|format = template|template = Modification_ul
|link=none
|order=ASC
}}</includeonly>
}}</includeonly>

Latest revision as of 14:24, 1 August 2012

Template Example

This template has been set-up to allow users to define the details of a modification event which occurred in relation to the thing being discussed on a given page. As an example on the NG1: Support page this template could be used multiple times to identify each change that was made to the support structure of NG1:

Example Code Options

{{Modification
 |name=Add an optional comma separated list of people involved 
in the event.
 |technique=Add an optional comma separated list of techniques 
used during the event.
 |date=Indicate the date, or time span with which this event 
took place.
 |dateTo=Optional second date to indicate the end of a range 
of years.
 |display=Display each entry. The default will be to hide all of the 
individual entries but then display a list using an inline query.
 |note=Free text description of the actual modification event 
including all of the required details.
 |rtSupport=true or false, Modification is related to the 
support
 |rtPrep=true or false, Modification is related to the 
preparation layers
 |rtPaint=true or false, Modification is related to the 
paint layers
 |rtSurface=true or false, Modification is related to the 
surface coatings
}}

In addition to displaying the details entered the following internal semantic object will also be created with the defined semantic properties.

{{#set_internal:P31F-has_modified
|P14F-carried out by#list={{{name|}}}
|P32F-used general technique#list={{{technique|}}}
|PN12F-has start date={{{date|}}}
|PN13F-has end date={{{dateTo|}}}
|P3F-has_note={{{note|}}}
|PN15F-is_related_to={{#ifeq: 
  {{{rtSupport|}}}| Yes |Category:EN13-Support|}}
|PN15F-is_related_to={{#ifeq: 
  {{{rtPrep|}}}| Yes |Category:EN48-Preparation_Layers|}}
|PN15F-is_related_to={{#ifeq: 
  {{{rtPaint|}}}| Yes |Category:EN46-Paint_Layers|}}
|PN15F-is_related_to={{#ifeq: 
  {{{rtSurface|}}}| Yes |Category:EN47-Surface_Coatings|}}
}}

Example Code

{{Modification
 |name=Joseph Padfield
 |technique=Edited 
 |date=2011
 |dateTo=2012
 |display=yes
 |note=I created then edited this particular template.
}}
  • 2011-2012: I created then edited this particular template. (Joseph Padfield)