Kategorier
Programmering

Summarize number of pages by page type

An edi­tor nee­ded infor­ma­tion about the num­ber pages for each page type on their site. The following simp­le code will retri­e­ve all pages below the start page, group them by their page type name, and then count how many of each page type the­re is. It’s pro­bably much, *much* fas­ter to this via SQL, but […]