PGI logo cropped.png
Congressional Millionaire’s Club
The Personal Gain Index shines a light on how members of Congress benefit during their tenure.





Help:DPL metadata transclusion

From Ballotpedia
Jump to: navigation, search

Metadata

  • DPL’s allow you to add a great deal of metadata to a list. Metadata is information that is attached to each wiki page by the wiki which remains hidden. It includes things like edit history, category lists, editors, and page counts and touch dates.
  • This information is extremely similar to the information which can be included using Fixed wiki variables.
  • Metadata requires specific tags to be included in the “|format =“ and other editing lines (Think back to %TITLE% and %PAGE%) in order for the information to appear.
  • The following chart highlights common metadata and how to include it in the format line.
MetadataPromptFormat tag
Edit date - The date the page was either first edited or last edited, depending on “ordermethod”. “|addeditdate = true” %DATE%
Add Category - Displays the categories each page is in.“|addcategories = true”%DATE%
Page Count - Displays the number of hits the page has received.“|addpagecounter= true”%COUNT%
Page Size - Displays the number of characters on the page.“|addpagesize = true”%SIZE%
Add Author - Adds the first person to edit the page.“|addauthor= true”%USER%
Last Editor - Adds the last person to edit the page.“|addlasteditor= true” %USER%
More Here!

Metadata examples

Example:  Formatted metadata inclusion
Code:  
{{#dpl:
|category = Former member, U.S. Senate
|ordermethod = firstedit
|addpagecounter= true
|addpagesize = true
|addauthor= true
|format = <center>This is a list of former U.S. Senate members:</center><hr>,\n# [[%PAGE%{{!}}%TITLE%]],Hits=%COUNT% Pagesize=%SIZE% Author=[[User:%AUTHOR%]],<br/>List completed!
|count = 10
}}
Description:  
Complex formatting with metadata included. Count limited to ten for convenience.
Example:  
This is a list of former U.S. Senate members:

  1.  Barack Obama Hits=loading... Pagesize=87489 Author=User:Kristinpedia
  2.  Scott Brown Hits=loading... Pagesize=31820 Author=User:Chicagoist
  3.  Kay Bailey Hutchison Hits=loading... Pagesize=14661 Author=User:Calebhowe
  4.  Sam Brownback Hits=loading... Pagesize=18997 Author=User:Gtjanetka
  5.  John Kerry Hits=loading... Pagesize=22878 Author=User:Gpallay
  6.  Max Baucus Hits=loading... Pagesize=29150 Author=User:Rmkenyon
  7.  Ben Nelson Hits=loading... Pagesize=10748 Author=User:Rmkenyon
  8.  Frank Lautenberg Hits=loading... Pagesize=16332 Author=User:Rmkenyon
  9.  Jeff Bingaman Hits=loading... Pagesize=11908 Author=User:Rmkenyon
  10.  Joe Lieberman Hits=loading... Pagesize=12776 Author=User:Jennifer S
    End of list.


References

You'll notice that the references did not carry through. That is because DPLs currently delete all references above them. You should be cautious where you place them on your page.