If you have few root nodes, you can use code like that:
var allPublishedContent = new List<IPublishedContent>();
foreach (var publishedContentRoot in Umbraco.TypedContentAtRoot())
{
allPublishedContent.AddRange(publishedContentRoot.DescendantsOrSelf());
}
Get All Published Pages Urls
Hi All,
We need to fetch urls of all the published pages in Umbraco.
Can any one please help us on this?
Regards
Tarunjit Singh
Hi Tarunjit
What do you mean by "fetch" - write them out in the screen? If so, you can probably use the Sitemap script
Developer > Partial view macro files > Create new Select "Sitemap" from the list.
This will give you a helper which draws a list, recursively with all nodes - easy to read and modify.
Theo
The following query will get all published nodes under the home page:
Hi Tarunjit,
If you have few root nodes, you can use code like that:
Hope it will help you.
Thanks,
Alex
is working on a reply...