Contentful GraphQL filter for filtering entries by linked references - content-management-system

I read this blog post which shows how to filter entries by linked references in contentful Graphql.
https://www.contentful.com/blog/2021/06/15/filter-entries-by-linked-references-in-graphql-api/
But i can't do as it says. Graphql playground only highlighting the entryCollection with sys data. I need the parent blogPostCollection but it doesn't show up. What should I do ? Anything changed ? I followed all the tutorials and blog but it ain't working anymore.
Besides I can't query the author-name and details under the blogPostCollection. It's already took a lot of time. I tried the same schema in sanity and I was able to query the author details under the blog post.

Related

How to get posts orderby comment_count ascending and where to place the code? (Wordpress REST API)

I am a complete beginner when it comes to extending Wordpress REST API. I need to extend the API so that a request to /wp-json/wp/v2/posts?orderby=comment_count&order=asc would yield a response with posts that are ordered by comment count in ascending order ie. posts with the least amount of comments appear first.
I skimmed through the REST API Handbook and watched a couple of YouTube videos, but found no answer to my problem. I found this answer and it looks promising, however I'm not entirely sure if the code provided there fits my needs. From what I could gather WP_Query class is what I'm looking for, but I don't know how to make use of it. My second problem is that I don't know where exactly to place any code I may have stumbled upon ie. which file is supposed to play host to the code eventually?
I would greatly appreciate detailed answers and possibly sources for more information regarding this topic.
According to WordPress documentation orderby only accept following parameters:
author, date, id, include, modified, parent, relevance, slug, include_slugs, title
But you can add custom parameters to orderby if you have access to Wordpress website code. Please follow the below URL:
https://www.timrosswebdevelopment.com/wordpress-rest-api-post-order/
Let me know if you need more help.

Is it safe to edit the schema of a blog post in Sanity, after I already have added 4-5 long posts (using the same schema)?

I currently have a blog running on Next.js + Sanity. I have had a lot of success, but in the past when setting it all up encountered a scary error while editing the blog post schema, that basically crashed and caused me to lose my most recent blog post. I assume it had to be an error with trying to change schema of a blog post as it was being written?
Anyway, I now have a few long posts published, and I don't want to lose them. They are in production and getting views, but now I'm realizing I want to add alt tags to all of their images, which I will do via editing the schema.
Is this known as a safe thing to do with Sanity? I can't afford to have these posts go down on me.
Thank you.
Yes, this is safe to do. If you want to add fields in your schema you won’t run into problems with the existing posts. It’s only when you change the schema type or rename schema fields where you might run into problems. However, these can be solved by exporting your data, reshaping it, and then importing it into your project again. You can find more info about that here: https://www.sanity.io/docs/migrating-data#1-export-c4665bde1f66

Show List of Products from sql in between blog content in codeigniter using tinymce

i am working on a blog system for my travel project on codeigniter. i am using tinymce for entering blog content.
one thing, i want is - display a list of travel packages from sql results in between those content.
how to achieve this using codeigniter and tinymce.
i have tried searching for threads and forums, but couldn't find anything related to it.
i hope someone can help me in this here.
i hope this screenshot can help in understand that what i want.
Reference to the question

modx replacing article link with a link of categories

I've got a staging and live site I'm working on (not my code base). I've accidentally replaced the live server with some staging code (no backup (slap me)) and I'm getting weird urls for articles on the sites 'blog' page.
Basically everything's being called into the page correctly but the page header link is being screwed.
Rather than being
http://www.example.com/a-nice-url
it's giving me
http://www.example.com/news,recent,pr,etc
which appears to be the list of categories of the article.
Where/How can I easily fix this?
I'm only calling [[*content]] and can't find where that is.
Linking to an article I know is there with the correct url works still.
any ideas would be greatly appreciated.
I assume your blog page has some sort of listing somewhere, maybe a getResources call? If you can't find it in your blog list template (as you're saying you only see a *content), it means the list is probably "hardcoded" in the blog list resource content field.
You'll want to find the chunks being used to output each blog entry on the lists and check which page parameter is used to construct the link. It should probably be *alias, and if it is and your aliases are correct you have some deeper trouble going on.

Tutorials and resources on jqgrid and flexigrid

Am currently trying to use for the first time both jqgrid and flexigrid to make database driven pages whos backend uses Zend Framework.
I have been googling and the search results that turn up aren't very helpful.
Any links that can be helpful?
Sorry I'm not fammiliar with the Zend framework, but as per a useful link for jqGrid documentation I find this wiki to be the best.
Edit: This is also a valid documentation resource here.
The Demo page on the official jqGrid site provides a lot of good examples and the code behind them.
Well worth checking out as it covers most things you can do with it.