...
- Create a new file in the SIL Manager called pageViewReport.sil
Paste the following code into the file editor window:
Code Block language java linenumbers true struct table { string Title; string Views; } string cql = "(type=page and Space=" + argv[0] + ")"; number [] pages = selectPages(cql); table [] tableData; for(number p in pages) { table t; t.Title = p.title; t.Views = getPersistentVar(p, "counter"); tableData += t; } return tableData;
- Save the file
- On a new page add the SIL Table macro
- Edit the macro
- Select the pageViewReport.sil script for the script setting
- Add "Page, View Counts" into the columns setting
- Enter the key of the space the page is in for the input setting
- Save the macro
- Save the new page
...