If not, then resumably it's just a case of running a query on the database to get all published pages from the website then exporting to Excel
In that case does anyone have a script that would do the trick?
It's my quick and dirty output all pages and count the doc types used. I usually just create a new doc type and template called test - pop this in the template body and then create the node, hit the page, copy the output then delete the node.
@{
// either set your home node ID or juse use the typed content at root
var homeNode = Umbraco.TypedContentAtRoot().First();
// var homeNode = Umbraco.TypedContent(1068);
var allNodes = homeNode.DescendantsOrSelf();
var docTypeCount = new Dictionary<string, int>();
}
<table>
<tr>
<th>Id</th>
<th>Name</th>
<th>DocType</th>
<th>Url</th>
<th>Some custom property</th>
</tr>
@foreach(var curNode in allNodes)
{
// increment the count if in dictionary or add new key if not
int currentCount;
docTypeCount.TryGetValue(curNode.DocumentTypeAlias, out currentCount);
docTypeCount[curNode.DocumentTypeAlias] = currentCount + 1;
<tr>
<td>@curNode.Id</td>
<td>@curNode.Name</td>
<td>@curNode.DocumentTypeAlias</td>
<td>@curNode.Url</td>
<td>@curNode.HasValue("someProperty")</td>
</tr>
}
</table>
<hr/>
<br/>
@{
<table>
<tr>
<th>Id</th>
<th>Name</th>
</tr>
@foreach (var curKey in docTypeCount)
{
<tr>
<td>@curKey.Key</td>
<td>@curKey.Value</td>
</tr>
}
</table>
}
<hr />
Content Inventory
I've been asked if it's possible to create a Content Inventory as outlined here https://www.usability.gov/how-to-and-tools/methods/content-inventory.html Is there any functionality within Umbraco to do this?
If not, then resumably it's just a case of running a query on the database to get all published pages from the website then exporting to Excel In that case does anyone have a script that would do the trick?
Thanks
This do you?
It's my quick and dirty output all pages and count the doc types used. I usually just create a new doc type and template called test - pop this in the template body and then create the node, hit the page, copy the output then delete the node.
Needs a copy and paste into Excel still ;)
HTH Steve
is working on a reply...