Lets say I have a page structure like so

 - Books
      - Lord of the rings
      - Harry potter
      - Mice and Men

Now I want to display the titles of all those child pages on the book page.
I found one question related to this: Piranha CMS: how to find child pages for a page

But when trying to use the api service I get

Unable to resolve service for type 'Piranha.Api'

I have services.AddPiranha(); In my configuration, and I dont see any other service that would be more apropriate to add.

I am running dot net core 2.2 and Piranha 7.0.3

Anyone got any suggestions?

The type that you should inject is Piranha.IApi, the class Piranha.Api is the default implementation of it!

Best regards

2