Join the Webstudio community

Updated last month

CMS filters on the webstudio side

At a glance

The community member has a question about how to filter posts in a CMS collection when there is no possibility to request via GET filters. They have the data, with each post having a name for a tag and its slug, and they want to get through the collection of posts where the slug equals a certain value. The community member tried using AI but it did not work, so they are seeking help from a "living person".

In the comments, other community members suggest using the "show" prop of the collection item to write a condition, which would be server-rendered and avoid SEO issues. They also mention that the API documentation for the "zenblog" platform does not contain information about filters, and the community member wrote to the developer about this.

Eventually, the developer responds and updates the documentation, adding two query parameters to filter by tags and category. They provide an example request that demonstrates how to use these filters.

Useful resources
Hi everyone,

I have a question about how to filter if there is no possibility to request via GET filters.
I got the data, I have each post has a name for tag and its slug. How can I get through a CMS collection of posts slug whose equals a certain value.

With AI tried not worked, need help of a living person ))
2
O
B
D
12 comments
Have you searched our youtube channel for examples?
@Denis you can write condition in "show" prop of collection item.
Since show prop is server rendered you won't get problems with SEO.
on baserow yes and with it no problems. decided to darken zenblog and with him while there is. documentation does not contain information about filters, so looking for a solution)
from what I can see their api looks like this https://www.zenblog.com/docs/api/posts
It worked)
is quite easy to implement and does what you need. If it does not load the site then great.
Yes, I looked at the documentation. I went through it and plugged everything in. But there’s nothing about filters. I wrote to the developer just in case he didn’t have documentation.
Hey! I've updated the docs and added 2 query params to filter by tags and category

https://www.zenblog.com/docs/api/posts

Let me know if that solves the issue. Thanks for trying zenblog 🙂
Here's an example request:
Plain Text
https://zenblog.com/api/public/blogs/YOUR_BLOG_ID/posts?category=marketing&tags=tools,seo
Hi Jordi. Jumping on to this as I have a somewhat similar query about Zenblog, which is a great and simple platform btw to post on.
Happy to make a new thread if needed.

So my query is also about using Zenblog as a source for a Webstudio site.
Google might see the content as duplicate if it's indexed on both Zenblog and Webstudio site.

To avoid this:
1) Canonical Tag: On Zenblog, set a canonical URL pointing to your Webstudio domain. This tells Google that the Webstudio version is the original.

Insert the Canonical Tag: Within the <head> section of the HTML, add the following line:​

<link rel="canonical" href="https://yourwebstudiodomain.com/path-to-content" />
with the exact URL of the corresponding content on your Webstudio site.

2) Look for options to set canonical URLs for your posts .​or instance, filters such as get_canonical_url to customize canonical URLs for individual posts.

-Noindex on Zenblog: If you don't want Zenblog pages indexed at all, add a noindex meta tag. (not relevant in my case)

-Nofollow on Links: If you're concerned about passing SEO value to Zenblog, you can add rel="nofollow" to links pointing there, but this won’t prevent indexing.

Is any of this possible or are you planning to build this into Zenblog perhaps?
Thanks!
Hey! Zenblog no longer hosts blogs, this was a feature I removed during development (still hosts my personal blog but thats it) so google can only find your content on your site when you publish it on your domain.

This way you can add the canonical tag in your webstudio site, fetch the content from zenblog and cross post in medium or other platforms while keeping the SEO juice.

You are also free to add follow/nofollow links to your content since it will only get picked up by your site.

If you happen to have a very old site that still has a hosted blog let me know and I can remove it from the zenblog domain.
Attachment
image.png
Hi, my site is only a week old so it should be ok, will check out the canonical tag, thanks!
Add a reply
Sign up and join the conversation on Discord