Forum

Thread tagged as: Question

Content in Headless mode

Hi,

What are PerchBlogPosts and PerchBlogComments in the Blog example here https://docs.grabaperch.com/runway/headless/examples/blog/ ? I am trying to understand where they come from and whether there are other "things" I can get in a similar way.

Specifically I'm interested in getting the blog post tags and use perch_blog_post_tags() on it and also perch_blog_post_field() and perch_blog_post_categories(). So at the end I want to end up with a json containing title, categories and tags of each post.

Is it possible with the current state of headless functionality in P3?

Proko Mountrichas

Proko Mountrichas 3 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It's listed here: https://docs.grabaperch.com/runway/headless/

What's the scenario where you'd need perch_blog_post_field() ?

I want to get the post title. My use case is creating custom blog search functionality and I want to retrieve results only for tags, title and categories. So from the link you mention currently it is only possible to get the entire posts and comments right?

Drew McLellan

Drew McLellan 2638 points
Perch Support

So the case is actually that you want to be able to limit the output to a given subset of fields?

Exactly!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, that's a good suggestion.

Great! By the way are there any functional changes in blog from 5.0 to 5.5 or just upgrade for P3? https://docs.grabaperch.com/addons/blog/changelog/

Drew McLellan

Drew McLellan 2638 points
Perch Support

It just scooped up a bunch of accumulated bug fixes since the last release.