Try our conversational search powered by Generative AI!

Is there any "easy" way to count number of pages?

Vote:
 
 

Is there any "easy" way to count number of pages?

I must esteem how many pages there are on our Intranet. Do anyone know any smart way how to calculate how many pages there are under a "root"?

Since it is on our Intranet I cannot use any "free ware" or anything out at www. I have to stick to basics or what's found in CMS.

On top of that I would be happy to know how many files from upload that are linked to. But I guess this is an impossible question or????

Sorry if I post this in wrong forum. But there doesn´t seem to be any forum that is more suitable than the other. I guess many of you have/had the same problem as I have.

And by the way - I´m not a system developer ;)

 

#32402
Sep 01, 2009 16:58
Vote:
 

I think I found the answer myself - just when post this issue -
Reportcenter :)

Or is there any better way?

#32404
Sep 01, 2009 17:22
Vote:
 

Hi,

You can see total number of pages in the database in admin mode.

#32523
Sep 06, 2009 19:30
Vote:
 

As Per mentioned, when you open Admin mode, before clicking to any other pages, you can see some information from the database. Please let us know if this is not the information you'e looking for.

#32533
Sep 07, 2009 11:24
Vote:
 

Yes but I´m not trusted :( 

Working in an organization with 2000 editors and 40 infomasters an "ordinary" projektleader & infomaster has very limited access to admininstration stuff.

But the reportcenter gave the data I needed. So I´m happy for the moment Laughing
Well not exactely happy - far too many pages

#32535
Edited, Sep 07, 2009 11:36
Vote:
 

7 years later ... I don't see anything after clicking Admin. The page is blank. Is there a new way to do this now days or am I missing something?

#195500
Jul 26, 2018 16:54
Vote:
 

Do you use Find? If so you can go to the overview view, and see number of content items per content type.

Also worth checking out Nicola Ayan's Content Audit tool - very cool stuff https://blog.nicolaayan.com/2018/05/episerver-cms-audit-nuget-package/ 

#195511
Jul 27, 2018 4:19
Vote:
 

11 years later ... I don't see anything after clicking Admin. The page is blank. :-)

#255689
May 28, 2021 15:05
Vote:
 

Using EPiServer.DataAbstraction.IContentTypeRepository you can list out all the content types including root page.

- For solution here is the sample code:

int pageCounts = _contentTypeRepository?
                .List()?
                .Where(x => x.GetType().Name == "PageType")?
                .Count()
#255727
May 29, 2021 10:26
Vote:
 

The database is your friend!

Count pages:

SELECT *
FROM tblContent
WHERE ContentType = 0

To count pages (all decendents) under a root, first get the path to your root (example with page id 8):

SELECT ContentPath 
FROM tblContent
WHERE pkId = 8

In this example the result is .1.

Append the root id and a dot (8.) + the wildcard character % and you are ready to go:

SELECT *
FROM tblContent
WHERE ContentPath LIKE '.1.8.%' AND ContentType = 0

Want easier access to the database? Have a look at this: https://www.gulla.net/no/blog/sql-addon-for-episerver-cms/

#255761
Edited, May 30, 2021 5:57
Vote:
 

I see some excellent answers above however I am not sure we are getting enough context regarding that question:

  • Are we including unpublished pages ?
  • Are we including content tree nodes that are not pages ?
  • Are you using tools on that website to generate dynamic pages ? Partial router or different pages based on the query strings ?

It is possible to list the "pages" in EPiServer, but it is sometimes easier to check with SEO tools (like google console search) to list the "real" pages that are out there.

Please bear in mind that this solution is for public pages only. For extranet / portals, the solutions that could work are:

  • Count the pages in the database minus the "repository" nodes & page variations by query string.
  • Use a custom crawler to list the pages that are available in your extranet.
#255764
May 30, 2021 8:20
Vote:
 

Thanks for this information! Very interesting solution! Thanks!

#265719
Oct 27, 2021 14:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.