Return a list of Print Templates
You can use the getdata.aspx to return a list of the Print Templates in the web folder. The getdata.aspx may be found in the \Web\print folder e.g. http://custom.astun.local/mycouncil/web/getdata.aspx?.
This is a JSONP request type.
JSONP Request
Performing this JSONP request will return the results to your specified function.
Request
http://my.council.gov.uk/web/GetData.aspx?callback=jQuery164018111200840212405_1448353344988&Type=jsonp&Service=PrintTemplates&RequestType=JSON&_=1448353345191
Parameters
Name | Requirement | Description |
---|---|---|
callback | mandatory | This is the function name that you wish to use to format the results as JSONP data |
type | mandatory | This will always be “jsonp” |
service | mandatory | This will always be “PrintTemplates” - specifying that we want the template details returned |
RequestType | mandatory | This will always be “JSON” - specifying what part of GetData responds to the code |
_=1448353345191 | mandatory | A random parameter to ensure the response isn't cached. |
Results
jQuery164018111200840212405_1448353344988([ { "name":"astun-A4-landscape", "page":"astun-A4-landscape.html", "defaultTemplate":"False" }, { "name":"astun-A4-portrait", "page":"astun-A4-portrait.html", "defaultTemplate":"False" }, { "name":"costar-A4-portrait", "page":"costar-A4-portrait.html", "defaultTemplate":"False" }, ]);